The AutoComplete plug-in brings us a lot of convenience.
Http://view.jquery.com/trunk/plugins/autocomplete/demo/
There are some source code demos. I want to carefully study its code intent. (View Graph Analysis Code)
(1) single city (local) indicates local data. What is the background processing?
$ ("# Singlecity"). Focus (). AutoComplete (cities );
At this time, cities already exist. In a JS file,
VaR cities = [
"Aberdeen", "ADA", "adamville", "addyston", "Adelphi", "Adena", "Adrian", "Akron ",
"Albany", "Alexander", "Alger", "alledonia", "Alliance", "Alpha", "alvada ",
"Alvordton", "Amanda", "Amelia", "amesville", "Amherst", "amlin", "Amsden ",
"Amsterdam", "Andover", "Anna", "Ansonia", "antwerp", "Apple Creek", "Arcadia ",
"Arcanum", "Archbold", "arington", "Ashland", "Ashley", "Ashtabula", "Ashville"];
The AutoComplete () method has been implemented internally.