+ 3
How can enter a text in a dropdown ?
2 Réponses
+ 3
Use <datalist> tag to have a input field with drop down option.
Example:
<input list="course">
<datalist id="course">
<option value="HTML">
<option value="CSS">
<option value="JS">
</datalist>
Note:
1. List attribute must be included in input tag
2. Value of 'list' attribute in input tag and 'id' attribute in datalist tag should be same
0
by using <option>.
example:
<!- -dropdown menu of dates- ->
<select>
<option>2010</option>
<option>2011</option>
<option>2012</option>
<option>2013</option>
<option>2014</option>
<option>2015</option>
<option>2016</option>
<option>2017</option>
<option>2018</option>
<option>2019</option>
</select>
simple syntax