jQuery的自动完成通配符 [英] Jquery autocomplete wildcard

查看:99
本文介绍了jQuery的自动完成通配符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 jquery.ui.autocomplete 插件,但我发现在搜索时,它采用了外卡这样的'%值%

I am using the jquery.ui.autocomplete plugin, but I noticed when it searches, it uses a wild-card like this '%value%'.

我使用的是自动完成的zip- codeS,我认为这将让更多的外卡意识的工作就像这样'值%所以,当你开始输入,只筛选出的项目是什么,你已经输入'下手'。

I am using the auto-complete for zip-codes, and I think it would make more sense of the wild-card worked like this 'value%' so when you start typing it only filters out the items that 'start with' what you already typed.

我找不到这虽然任何文件。

I can't find any documentation on this though.

任何人有这种经验吗?

大部分AP preciated。

Much appreciated.

推荐答案

您可以使用功能为自动完成插件,它应该让你得到你想要的行为源选项。

You can use a function as the source option for the autocomplete plugin which should allow you to get the behaviour you want.

有一个非常类似的问题在这里问:<一href=\"http://stackoverflow.com/questions/2382497/jquery-autocomplete-plug-in-search-configuration\">jQuery自动完成插件它具有优良的答案,例如工作搜索配置。

There's a very similar question asked here: jQuery Autocomplete plug-in search configuration which has an excellent answer and working example.

这篇关于jQuery的自动完成通配符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆