因为以下代码不起作用:
<datalist id="somelist">
<option>these</option>
<option>options</option>
<option>should</option>
<option>appear</option>
<option>in</option>
<option>all</option>
<option>selects</option>
</datalist>
<select list="somelist" name="first"></select>
<select list="somelist" name="another"></select>
<select list="somelist" name="last"></select>
&#13;
有没有一种方法可以使用相同的选项填充多个选项?以下代码的问题在于它必须使用JavaScript来确保他们从列表中选择一些内容(我正在寻找更多&#34;优雅的&#34;解决方案):
<datalist id="somelist">
<option>these</option>
<option>options</option>
<option>should</option>
<option>appear</option>
<option>in</option>
<option>all</option>
<option>inputs</option>
</datalist>
<input list="somelist" name="first" />
<input list="somelist" name="another" />
<input list="somelist" name="last" />
&#13;