Jquery:在您键入时过滤下拉列表

2022-01-11 00:00:00 jquery jquery-plugins javascript

我使用了一个原型插件,可以在您键入时过滤下拉列表的内容.因此,例如,如果您在文本框中键入cat",则只有包含子字符串cat"的项目才会作为选项留在下拉列表中.

I have used a prototype plugin which filters the contents of a dropdown as you type. So for example if you typed 'cat' into the text box, only items containing the substring 'cat' would be left as options in the drop down.

有谁知道可以做到这一点的 jquery 插件吗?

Does anyone know of a jquery plugin which can do this?

推荐答案

我写了 一个小脚本来做这是几年前的.很可能,它可以很容易地打包为一个 jQuery 插件.不客气.

I wrote a little script to do this a few years ago. It could be packaged up as a jQuery plug-in quite easily, probably. You're welcome to it.

如果您想查看我的 PHP 函数参考 仪表板小部件,我也会这样做那里的代码.

I also do this in my PHP Function Reference Dashboard widget if you want to look at the code there.

相关文章