Home  >  Article  >  Web Front-end  >  Autocomplete implementation method in jQuery-ui_jquery

Autocomplete implementation method in jQuery-ui_jquery

WBOY
WBOYOriginal
2016-05-16 18:25:261174browse

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn