Autocomplete Jquery
Lo importante aqui es tener una etiqeuta input <input id="tags">.
DEMO
index.html
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
Post a Comment