I have a select box:
<select id="item1" name="Item 1">
<option> </option>
<option> Camera </option>
<option> Microphone </option>
<option> Tripod </option>
</select>
And I have this JavaScript:
var item1= document.getElementById("item1").value;
item1
always shows empty, never the option selected. However, this works in firefox.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…