简体   繁体   English

选择选择javascript选项

[英]chosen select javascript option

I use Chosen select library. 我用选上的选择库。 I have question in select option. 我在选择选项上有疑问。

Example select box 示例选择框

<select>
  <option>co.google</option>
  <option>co.yahoo</option>
  <option>co.lycos</option>
</select>

If I search "oole" return "co.google" now recognize same first charactor. 如果我搜索“ oole”,则返回“ co.google”,现在可以识别相同的第一个字符。 Is it possible? 可能吗? where to change? 在哪里改变?

If I understood well your problem, you want to use Chosen but with a sort of typing errors tolerance? 如果我很了解您的问题,那么您想使用“选择的”字词,但具有一定的输入错误容忍度吗?

Sorry but Chosen only works with exact typing. 对不起,但选择仅适用于精确键入。

You should have a look to autocomplete lib which use fuzzy search. 您应该看一下使用模糊搜索的自动完成库。

Here is the opened issue about implementing fuzzy search in Chosen: https://github.com/harvesthq/chosen/issues/858 这是关于在选择中实施模糊搜索的未解决问题: https : //github.com/harvesthq/chosen/issues/858

I suggest you to switch to this lib: http://fusejs.io/ It does fuzzy search and it's really easy to style. 我建议您切换到该库: http : //fusejs.io/它可以进行模糊搜索并且非常容易设置样式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM