黑色幽默 2014-03-03
<htmlxmlns="http://www.w3.org/1999/xhtml">
2<headrunat="server">
3<title>AutoComplate</title>
4<scripttype="text/javascript"src="/js/jquery-1.4.2.min.js"></script>
5<scripttype="text/javascript"src="/js/jquery.autocomplete.min.js"></script>
6<linkrel="Stylesheet"href="/js/jquery.autocomplete.css"/>
7<scripttype="text/javascript">
8$(function(){
9vardata="CoreSelectorsAttributesTraversingManipulationCSSEventsEffectsAjaxUtilities".split("");
10
11$('#keyword').autocomplete(data).result(function(event,data,formatted){
12alert(data);
13});
14});
15</script>
16</head>
17<body>
18<formid="form1"runat="server">
19<div>
20<inputid="keyword"/>
21<inputid="getValue"value="GetValue"type="button"/>
22</div>
23</form>
24</body>
25</html>
bind("input",function(){
//@hackbyliqt:supportforinputingchinesecharactersinfirefox
onChange(0,true);
});
改为
.bind("unautocomplete",function(){
select.unbind();
$input.unbind();
$(input.form).unbind(".autocomplete")
}).bind("input",function(){
//supportforinputingchinesecharactersinfirefox
onChange(0,true);
});