Show all options datalist on focus

Is there a way to show all datalist parameters in focus? I need to show all options even after pressing a key.

<form action="" method="get"> <input list="browsers" name="browser"> <datalist id="browsers"> <option value="Internet Explorer"> <option value="Firefox"> <option value="Chrome"> <option value="Opera"> <option value="Safari"> </datalist> <input type="submit"> </form> 

Fiddle

PS: This is not the same as this question. My datalist parameters are dynamically generated using jquery.

+5
source share
1 answer
 $('input').on('click', function() { $(this).val(''); }); 

try this, it will work

-1
source

Source: https://habr.com/ru/post/1240799/


All Articles