基于prototype的输入自动提示autocomplete
发布时间:2018-10-16 18:16:10 所属栏目:模式 来源:站长网
导读:基于prototype的输入自动提示autocomplete效果 效果: autocomplete.js: Copy to Clipboard 引用的内容:[www.veryhuo.com]var Autocomplete = function(el, options){ this.el = $(el); this.id = this.el.identify(); this.el.setAttribute('autocomple
使用: Copy to Clipboard![]() function onAutocompleteSelect(value, data){ //.. } var rand = new Date().getTime(); var url = 'data.js?r=' + rand; new Autocomplete('txtEmployeeNum', { serviceUrl: url, width: 300,//可选 onSelect: onAutocompleteSelect, //可选 showNumber: true //显示条数 //container: 'ac_container'//可选 }); }); <input type="text" name="q" id="txtEmployeeNum" /> <!-- <font id="ac_container"></font>--> (编辑:晋中站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |