读书人

autocomplete 自动完成控件应用 简记

发布时间: 2012-10-28 09:54:44 作者: rapoo

autocomplete 自动完成控件使用 简记
一、需要准备的文件:
jquery.js
neverModules-autoComplete.js
autocomplete.css
animated_loading.gif

二、页面:
1、引入文件:


2、需要自动补全的文本框:

貌似当全页面只有一个文本框时,自动补全的时候,敲回车键,会弹出到新连接页面,再加个吧:<input id="aaaxxxx" type="text" name="sd2xxxx" style="display: none">

3、js函数:

function dosubmit(){var inputvalue = $("#operatorName").val();if(typeof(inputvalue) != "undefined") { if(typeof(keyValues[inputvalue]) == "undefined") {alert('你指定的人员不存在,请重新选择!');    return;    }    }......}


读书人网 >Web前端

热点推荐