惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
J
Java Code Geeks
博客园 - 聂微东
B
Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
WordPress大学
WordPress大学
腾讯CDC
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Azure Blog
Microsoft Azure Blog
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
美团技术团队
博客园 - Franky
Google DeepMind News
Google DeepMind News
V
V2EX
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
The Cloudflare Blog

博客园 - deerchao

Unity 在平面上播放含透明通道的视频(Play video with alpha channel on plane in unity) 域名迁移 错误721 -- 在虚拟机中连接VPN, 显示验证用户名和密码之后出错 - deerchao 繁体编码文本文件转换为简体编码的工具 生成VB多行字符串常量的工具 64位虚拟机Guest OS安装错误:0xC0000225 在64bit Win2008上运行Asp + Access网站 工具: 删除Visual Studio项目中文件链接,并把原文件复制到相应的目录 一个代表年月的类YearMonth Tip: Resharper 中 "Unknown Comment" 问题的解决办法 Struct与赋值 Tips 测试ConnectionString是否能连接上数据库服务器 奇怪的TreeView(WinForms)自动选中问题 From C# to VB MapPath的反函数(Reversing MapPath) A fast object clone class - using Expression.Compile() CDTray, 打开,关闭光驱的系统托盘程序 jQuery.Excel, 使用Ctrl+方向键/Home/End在input表格中移动
jQuery.combobox, 给文本框添加下拉选项的轻量级插件
deerchao · 2009-03-16 · via 博客园 - deerchao

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