+ 2
what does datalist do?
datalist
4 ответов
+ 2
<datalist> element belongs to the category 'phrasing content' which defines the text and mark-up it contains. This element contains a set of <option> elements for the <input> element:
<label>Choose a language from the list:
<input list="languages" name="lang"></label>
<datalist id="languages">
<option value="English">
<option value="Spanish">
<option value="Russian">
<option value="Chinese">
</datalist>
+ 2
It's more like a <select> list. But with <datalist>, the options aren't predefined. You can fill in another option of yours. <datalist> is a new HTML5 element. It has other uses like choosing color from a color pop-up, date, time..
0
Zinc has explained it all 👍
0
so it's like radio button?