26-问题
10.6.1 问题
你有一个用于选择颜色的下拉框,希望在其中添加新的颜色或者删除其中的选项。
<label for="colors">Colors</label>
<select id="colors" multiple="multiple">
<option>Black</options>
<option>Blue</options>
<option>Brown</options>
</select>
<button id="remove">Remove Selected Color(s)</button>
<label for="newColorName">New Color Name</label>
<input id="newColorName" type="text" />
<label for="newColorValue">New Color Value</label>
<input id="newColorValue" type="text" />
<button id="add">Add New Color</button>