JQuery自动填充控件:autocomplete(自己稍作了修改)

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 
 </head>
 <body>

  <script type="text/javascript" src="http://files.cnblogs.com/wzq806341010/jquery-1.7.2.min.js"></script>
  <script type=‘text/javascript‘ src="http://files.cnblogs.com/wzq806341010/jquery-ui-latest.js"></script>
  <link href="http://files.cnblogs.com/wzq806341010/jquery-ui.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript">
$(function(){
         $("input").live("focus click", function () {
            var $event = $(this);
            $event.autocomplete({ source: [1,2],
                minLength: 0, delay: 0,splitStr:"^",
                create: function (event, ui) {
                    $event.live("focus click", function () {
                        var active = $event.data("autocomplete").menu.active;
                        if (!active) {
                            $event.autocomplete("search", $event.val());
                        }
                    });
                }
            });
        });
});
        
</script>

<input type=‘text‘ value="" />

 </body>
</html>

JQuery自动填充控件:autocomplete(自己稍作了修改),古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。