jQuery.combobox, 给文本框添加下拉选项的轻量级插件
Description
jQuery.combobox is a lightweight jQuery plugin which transforms a textbox into a combobox, so users can enter text or select from supplied options.
It could be called more than once on the same textbox, however only the first time calling counts -- which means you can't change the suggestions once the combobox is created.
It would work with jQuery.bgiframe plugin to fix the IE select/zIndex bug if you include it in the same page.
Tested in IE 7, Firefox 3.
Updates
- 2009-3-18
- Suggestion matching is now case-insensitive
- The second time setting up combobox on the same textbox is working now
- Fixed the IE relative z-index bug by avoiding relative positioning
Demostartion
Usage
Html
<input class="combo" />
Script
<link href="jquery.combobox.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.combobox.min.js"></script> jQuery('.combo').combobox(['option1', 'option2', 'option3', ...], {imageUrl : '/images/dropdown.gif'});
Copyright
It's released under the MIT licence, so use it however you want.
By deerchao@gmail.com on 2009-3-16
Download
https://files.cnblogs.com/deerchao/jquery.combobox.zip
posted on 2009-03-16 15:43 deerchao 阅读(18560) 评论(4) 编辑 收藏 举报
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~
2007-03-16 使用 LumiSoft.Net.POP3.Client 接收邮件