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

让我恰个饭吧.ヘ( ̄ω ̄ヘ)

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



恰饭广告

发表评论

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

92 ÷ 92 =