0
Why does this code not work?
I only changed two of the color names but even the original does not produce the pull down datalist. The original code only produces a box to receive input. input id="car" type="text" list="colors" /> <datalist id="colors"> <option value="Red"> <option value="Purple"> <option value="Blue"> </datalist>
1 ответ
+ 1
It looks like your input tag is missing the opening <. Why don't you use this instead?
<select>
<option value="Red">Red</option>
<option value="Purple">Purple</option>
<option value="Blue">Blue</option>
</select>