Hello,
How can I select a value in a select box in javascript? For instance:
<select>
<option>California</option>
<option>Nevada</option>
</select>
I want javascript to basically add the html function "selected" to the option box based on a query I have. So if "CA" was returned, I'd want the javascript to select California in the dropdown.
Thanks for any help.
How can I select a value in a select box in javascript? For instance:
<select>
<option>California</option>
<option>Nevada</option>
</select>
I want javascript to basically add the html function "selected" to the option box based on a query I have. So if "CA" was returned, I'd want the javascript to select California in the dropdown.
Thanks for any help.