tags:

views:

3030

answers:

2
<select id="target">
  <option value="1">...</option>
  <option value="2">...</option>
</select>
+7  A: 
$("#target").val($("#target option:first").val());
David Andres
Should be noted that this more easily done with $("#target")[0].selectedIndex = 0;
David Andres
+10  A: 
$("#target option:first").attr('selected','selected');
Good second approach. Please add the value of the selected attribute. For example, attr("selected", "selected"). Without this extra parameter, the selection isn't made.
David Andres
yes you are correct..i forgot to add that value..
What if some option is already selected?
HeavyWave