`
flcz163
  • 浏览: 338 次
文章分类
社区版块
存档分类
最新评论

jquery autocomplete

    博客分类:
  • js
阅读更多
<html xmlns="http://www.w3.org/1999/xhtml">
2 <head runat="server">
3     <title>AutoComplate</title>
4     <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
5     <script type="text/javascript" src="/js/jquery.autocomplete.min.js"></script>
6     <link rel="Stylesheet" href="/js/jquery.autocomplete.css" />
7     <script type="text/javascript">
8         $(function() {
9             var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
10
11             $('#keyword').autocomplete(data).result(function(event, data, formatted) {
12                 alert(data);
13             });
14         });
15     </script>
16 </head>
17 <body>
18     <form id="form1" runat="server">
19     <div>
20         <input id="keyword" />
21         <input id="getValue" value="GetValue" type="button" />
22     </div>
23     </form>
24 </body>
25 </html>


bind("input", function() {  
     // @hack by liqt:support for inputing  chinese characters  in firefox  
     onChange(0, true);  
}); 

改为
.bind("unautocomplete", function() {  
        select.unbind();  
        $input.unbind();  
        $(input.form).unbind(".autocomplete")
    }).bind("input", function() {  
                                                // support for inputing  chinese characters  in firefox  
                                                onChange(0, true);  
                                                }); 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics