Javascript: how to document.print option value in Select block?
- by HH
The below returns [object HTMLOptionElement] while I try to return the value.
document.write(document.getElementById("allSelect").options[0]).value;
by value, I mean the thing called value there (there is a form around it but not relevant now):
<select name="allSelect" id="allSelect" size=3>
<option value="1"selected">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
How can I return the value of an option?