The function that completes automatically is AutoComplete, the concrete example can look here: http://www.b2c-battery.co.uk
Enter a product model in the search box to see the effect.
Here is an open source code: Autoassist, interested can look at.
The following is a code fragment:
Do not know why can not use keywords to do the name of the text box, I tried for a long time, and later still use keyword, do have to modify the original code.
The CSV file in the original example is separated by \ t, and we can separate it with spaces or other, depending on your data structure.
Of course, you can not read the file, change from the database to read materials, no longer nonsense.
The effect chart is as follows: