加入收藏 | 设为首页 | 会员中心 | 我要投稿 源码网 (https://www.900php.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 创业 > 模式 > 正文

基于prototype的输入自动提示autocomplete

发布时间:2018-10-20 22:06:14 所属栏目:模式 来源:站长网
导读:副标题#e# 基于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('a

使用:

Copy to ClipboardLiehuo.Net Codes引用的内容:[www.veryhuo.com] Event.observe(window, 'load', function() {

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>-->

(编辑:源码网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

推荐文章
    热点阅读