Reputation: 10448
I want to find out a value which is present in dropdown list and then select that value as selected object in dropdownlist. Im using jquery
Upvotes: 1
Views: 304
Reputation: 490597
In addition to Rahul's great answer, if you want to select it by its index, you can do...
$('select#my')[0].selectedIndex = 5;
Upvotes: 2
Reputation: 187110
If you want to select the option with a value you can use
$("#dropdownid").val(yourvalue);
Upvotes: 4