In an HTML5 <input>
element with pre-defined values in a <datalist>
, when user either enters a matching value or hits the down key, the dropdown list shows up.
Is there a way to trigger this dropdown list to show up? I might change the datalist
dynamically in Angular, and so would like to have a way to trigger the showing up of this list.
<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>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…