Menu
I would like to pull the displayed value from a select control, here is an example:
<select id=”test” name=”test” size=”1″>
<option value=”1″>Yes</option>
<option value=”0″>No</option>
</select>
I’d like Javascript to grab the Yes or No of the select, not the 1 or 0.
So, for simplicity, lets use an alert:
alert(document.getElementById(“test”).value)
That produces the alert box with 1, I’d like it to alert saying Yes.
How do I do that?