Home > Article > Web Front-end > Autocomplete implementation method in jQuery-ui_jquery
For example, there is a set of arrays ["abace","bceda","dabce","efeffd","daabc"]
use these values as the data source of the auto-complete control.
And enter "ab" in the input box, then three groups (1, 3, 5) will come out because there are ab
But I want the ones starting with "ab" . And know that searching uses regular expressions.
Next step is to change the source code. In the source code, find the method based on the passed regular object, and add a "^" character in front of the string passed in by the method. That's OK