Jquery 模糊查询自动补全插件

(..•˘_˘•..) 版权声明:转载原创文章请以超链接形式请注明原文章出处,尊重作者,尊重原创! (..•˘_˘•..)某些网站的小编真的是眼瞎! 转载注明出处!求求你了!

<html lang="en">

<head>
    <meta charset="utf-8">
    <title>测试页面</title>
    <link rel="stylesheet" href="https://www.idaobin.com/css/jquery-ui.css">
</head>

<body>
    <input type="text" id="tags">
    <input type="button" id="query" value="查询">
</body>
<script src="https://www.idaobin.com/js/jquery-3.2.1.js"></script>
<script src="https://www.idaobin.com/js/jquery-ui.js"></script>
<script>
    $(document).ready(function () {
        $(function () {
            var data = [
                "ActionScript",
                "AppleScript",
                "Asp",
                "BASIC",
                "C",
                "C++",
                "Clojure",
                "COBOL",
                "我是书",
                "的我发",
                "Fortran我",
                "Groovy",
                "Haskell",
                "Java",
                "JavaScript",
                "Lisp",
                "Perl",
                "PHP",
                "Python",
                "Ruby",
                "Scala",
                "Scheme"
            ];
            $("#tags").autocomplete({
                source: data
            });
        });
        $("#query").click(function () {
            var a = $("#tags").val();
            alert(a);
        });
    });
</script>

</html>

原文链接:https://www.idaobin.com/archives/2005.html

既然都复制粘贴转载了,就不能打赏一点…ヘ( ̄ω ̄ヘ)

支付宝 ——————- 微信
图片加载中图片加载中

发表评论

电子邮件地址不会被公开。 必填项已用*标注

+ 11 = 14