<div class="container" style="margin-top:80px;"> <div class="row"> <div class="col-sm-12"> <h3>Auto Complete text box using jQuery .</h3> <hr /> </div> </div> <div class="row"> <div class="col-sm-4"></div> <div class="col-sm-4"> <div class="ui-widget"> <label for="search">Search: </label> <input id="search" name="language" /> </div> </div> <div class="col-sm-4"></div> </div> </div>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script> $( function() { var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; $( "#search" ).autocomplete({ source: availableTags }); } ); </script>