How to using autocomplete function in <form> or <input>

It is a sample code example for using autocomplete function in form and input. It is usful and convenient when you create form and other input area.