基于建议 jquery 插件自动填充下拉框
您知道具有以下功能的 jQuery 自动完成插件吗?我已经搜索过了,但我似乎找不到我要找的东西。因此,这里是:
- 一个行为类似于
下拉过滤器
的控件, - 除了下拉过滤器的数据
在页面加载时未填充
- 下拉过滤器的数据
取决于用户在输入框中输入的内容
- 因此,有一个
输入框
,并且自动建议的项目位于li
上, - 如果用户没有输入任何内容或他输入的内容/她输入的内容与数据库中的任何内容都不匹配,如果
默认为一个值
, - 我将其称为
下拉自动建议
,而不是下拉过滤器
。因为下拉过滤器中已经包含您可以通过键入进行过滤的项目。下拉自动建议根据用户输入填充下拉列表
。我将其称为下拉菜单,因为用户可能无法输入自由文本
这是我目前可以获得的最接近的一个。 http://wharsojo.wordpress.com/2008/02/18/ jquery-facebook-autocomplete/ 这是多项选择,我只需要一项。下拉框似乎不可配置,因为我计划添加用户的头像和位置。
do you know a jQuery Autocomplete Plugin that has the following features. I have searched SO, but I can't seem to find what I'm looking for. So, here it is:
- A control that acts like a
dropdown filter
- Except data for the dropdown filter is
not populated on page load
- Data for the dropdown filters
depends on what the user types on the input box
- Thus, there is an
input box
and autosuggested items are on anli
- If the user does not type anything or what he/she has typed doesn't match anything on the database, if will
default to a value
- I call this a
dropdown autosuggest
not adropdown filter
. Because a dropdown filter already has items in it which you could filter by typing. A dropdown autosuggestpopulates the dropdown based on user input
. I call this a dropdown becausethe user may not input freetext
This is the closest one I could get for now. http://wharsojo.wordpress.com/2008/02/18/jquery-facebook-autocomplete/ and this is multiple selection in which I only need one. The drop-down box doesn't seem to be configurable as I am planning to add the avatar and location of the user.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想说,您可以通过使用 JQueryUI Autocomplete 来实现这一切。
我希望这对您有所帮助。
i would say, that you can achieve all this by using JQueryUI Autocomplete.
I hope this has helped you in some way.
你好,
我有一个与您的要求非常相似的 jquery 包,它非常简单,没有任何样式。
如需演示,请访问:
http://blog.prakashgobhaju.com.np/demos/jquery/auto -suggest.html
你也会找到下载链接
我希望这对你有帮助
HI,
I've a very similar jquery package as your requirement, its very simple, without any styling..
for demo go to:
http://blog.prakashgobhaju.com.np/demos/jquery/auto-suggest.html
you'll find there download link too
I hope this will help you