Jquery的autocomplete插件用法及参数讲解-创新互联
var emails = [ { name: "Peter Pan", to: "peter@pan.de" }, { name: "Molly", to: "molly@yahoo.com" }, { name: "Forneria Marconi", to: "live@japan.jp" }, { name: "Master Sync", to: "205bw@samsung.com" }, { name: "Dr. Tech de Log", to: "g15@logitech.com" }, { name: "Don Corleone", to: "don@vegas.com" }, { name: "Mc Chick", to: "info@donalds.org" }, { name: "Donnie Darko", to: "dd@timeshift.info" }, { name: "Quake The Net", to: "webmaster@quakenet.org" }, { name: "Dr. Write", to: "write@writable.com" } ]; //emails的数组格式如上,formatItem代表的是显示的格式,formatMatch表示匹配的内容,formatResult表示结果的内容 $("#suggest13").autocomplete(emails, { minChars: 0, width: 310, matchContains: true, autoFill: false, formatItem: function(row, i, max) { return i + "/" + max + ": \"" + row.name + "\" [" + row.to + "]"; }, formatMatch: function(row, i, max) { return row.name + " " + row.to; }, formatResult: function(row) { return row.to; } });
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
创新互联专注于中大型企业的成都网站设计、成都做网站和网站改版、网站营销服务,追求商业策划与数据分析、创意艺术与技术开发的融合,累计客户千余家,服务满意度达97%。帮助广大客户顺利对接上互联网浪潮,准确优选出符合自己需要的互联网运用,我们将一直专注成都品牌网站建设和互联网程序开发,在前进的路上,与客户一起成长!网站栏目:Jquery的autocomplete插件用法及参数讲解-创新互联
转载源于:http://scyanting.com/article/ihgjo.html