-
Autocomplete using Jquery.
about 11 years ago
-
about 11 years ago
What if i wanna make it dynamic ?
-
about 11 years ago
Below is the code for autocomplete using Jquery .
Contains style classes for AUTOCOMPLETE
Contains functions for AUTOCOMPLETE :
'Autocomplete' provides suggestions when you type into the textbox, here which are stored in a JavaScript array.
BELOW ARRAY CONTAINS ALL THE NAMES TO DISPLAY ON AUTOCOMPLETE 'EMP NAME' TEXT BOX
- var empNames = [
- "Amit",
- "Aman",
- "Raman",
- "Brijesh",
- "Rakesh",
- "Akshay",
- "Arohi",
- "Sita",
- "Saumya",
- "Deepak",
- "Shailesh",
- "Arpit"];
- $( "#names" ).autocomplete({
- source: empNames
- });
- });
- </script>
- </head>
- <body>
- <div class="ui-widget">
- <label for="names">Emp Names: </label>
- <input id="names">
- </div>
- </body>
- </html>
var empNames = [ "Amit", "Aman", "Raman", "Brijesh", "Rakesh", "Akshay", "Arohi", "Sita", "Saumya", "Deepak", "Shailesh", "Arpit"]; $( "#names" ).autocomplete({ source: empNames }); }); </script> </head> <body> <div class="ui-widget"> <label for="names">Emp Names: </label> <input id="names"> </div> </body> </html>
about 11 years ago
What if i wanna make it dynamic ?
1 Comment(s)