码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2014-07-26 00:45:16      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   http   java   color   io   re   

<!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(自己稍作了修改),布布扣,bubuko.com

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

标签:des   style   blog   http   java   color   io   re   

原文地址:http://www.cnblogs.com/wzq806341010/p/3868519.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!