<SELECT name="fruit">
<OPTION value="apple">apple</option>
<OPTION value="orange">orange</option>
<OPTION value="pear">pear</option>
</SELECT>
document.getElementById('dropDown').selectedIndex = 1;
But if you want to select an option in a select tag by value you can do the following:
0 comments:
Post a Comment