A simple Google search query would have returned the answer, which would be that "you can use jQuery UI for this". jQuery UI has a set of functions that are used for creating dynamic web pages. Autocomplete is a feature where you provide the user with a set of possible results depending on his current input value.
Go to
this[
^] page and test the code from the jQuery UI. You will be able to view the source code of the sample too.