javascript - How to make a dropdown box(select element) to accept text search in html? -


i have drop down(select element) box. want able search options in same element typing. have tried datalist in html5, in typed value accepted input if there no value in options. want option chosen option list, should able find typing text.

 <select name="xyz"> <option value="a">a</option> <option value="b">b</option> <option value="c">c</option> </select> 

here if type "a" search option should chosen. if type "x" search should not accepted input.

you can use <datalist>

<input type=text list=browsers> <datalist id=browsers>   <option value="firefox">   <option value="internetexplorer">   <option value="chrome">   <option value="opera">   <option value="safari"> </datalist> 

Comments

Popular posts from this blog

ios - Is 'init' forbidden as *part* of a variable name? -

file - Python: AttributeError: 'str' object has no attribute 'readlines' -

c# - Get the Class name in a class with atribute inside a attribute method -