Jquery: Filter dropdown list as you type(Jquery:在您键入时过滤下拉列表)
问题描述
我使用了一个原型插件,可以在您键入时过滤下拉列表的内容.因此,例如,如果您在文本框中键入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.
这篇关于Jquery:在您键入时过滤下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Jquery:在您键入时过滤下拉列表
基础教程推荐
- Bootstrap 模态出现在背景下 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
