marcosxp Posted May 12, 2020 Share Posted May 12, 2020 I'm using the Autocomplete of w3schools, however the need to search for approximation arose Example If I type bar it returns me Barbados However, I need that in addition to returning Barbados he also returns me Antigua & Barbuda because here also contains the letters bar Is there any way to adapt this code to make it work like this? Link to comment Share on other sites More sharing options...
Ingolme Posted May 12, 2020 Share Posted May 12, 2020 You can use indexOf() to see if the search term can be found in each item in the array. Link to comment Share on other sites More sharing options...
ishan_shah Posted May 25, 2020 Share Posted May 25, 2020 You can also use jQueryUi autocomplete for that,you can find all the references here:https://jqueryui.com/autocomplete/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now