简单教程
提交运行
代码编辑器:
<!DOCTYPE html> <meta charset="utf-8"> <link rel="stylesheet" href="https://cdn.staticfile.org/jqueryui/1.12.1/themes/smoothness/jquery-ui.min.css" /> <link href="/static/next/css/tryit.css?v=2017082407" rel="stylesheet"/> <div class="ui-widget"> <label for="tags">Tags: </label> <input id="tags"> </div> <footer>简单教程,简单编程<br/>Copyright © 简单教程 www.twle.cn</footer> <script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script> <script src="https://cdn.staticfile.org/jqueryui/1.12.1/jquery-ui.min.js"></script> <script> $(function() { var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; $( "#tags" ).autocomplete({ source: availableTags }); }); </script>
运行结果: