我使用这个插件问题与选择harvesthq的jQuery插件
http://harvesthq.github.com/chosen/
,我有当我搜索用空格一些选项的具体问题。 例如我有一个选项,THA是 “安提瓜岛Ÿ巴布达” 如果I型:
- 安提瓜岛ý巴布达 - >确定
- 安提瓜岛ý - >确定
- 巴布达 - >确定
- ÿ - >确定
- Ÿ巴布达 - >失败
当我开始写不是第一个字(只有在具有BLAN情况下,只有失败KS)
正则表达式:
regex = new RegExp(regexAnchor + searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
zregex = new RegExp(searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'i');
[更改jQuery插件选择中的搜索行为]的可能重复(http://stackoverflow.com/questions/9274362/changing-search-behavior-in-jqu插入选择) – 2014-03-01 10:48:02