Is there a JavaScript member function to select by value (set as selected) one of the OPTIONs in a SELECT tag? Is it cross-browser?
<select id="mySelect">
<option value="1">One</option>
<option value="2">One</option>
</select>
If not, what’s a good way.
Yup:
Where
"2"is thevalueof the option you want to select.