Autocomplete Jquery

Lo importante aqui es tener una etiqeuta input <input id="tags">.

DEMO



index.html
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.21/themes/base/jquery-ui.css" type="text/css" media="all" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js" type="text/javascript"></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>
</head>
<body>
      
  
    <div class="ui-widget">
           <label for="tags">Ingrese algun texto: </label>
           <input id="tags">
    </div>

</div>
</body>
</html>



Bueno hasta la proxima amigos y espero sus comentarios.

Comments

Popular posts from this blog

Error al Iniciar Oracle SQL Developer 11g - Unable to find Java Virtual Machine

Como Mantener el Scroll despues de un PostBack ASP.net ( As Maintain Scroll after a PostBack ASP.net )

How to run ng serve in a different port
Como ejecutar ng serve en un puerto diferente