Select an option in select tag by value(amrelgarhytech.blogspot.com)
submitted by
amrelgarhy(825) 3 years, 8 months ago
<SELECT name="fruit">
<OPTION value="apple">apple</option>
<OPTION value="orange">orange</option>
<OPTION value="pear">pear</option>
</SELECT>
If you need to select an option in a select tag by index you can do the following:
document.getElementById('dropDown').selectedIndex = 1;
But if you want to select an option in a select tag by value you can do the following:
|category: ASP.NET
|Views: 9
tags:
ASP.NET another
Everyones tags:
Your Tags: