預設的值]
").attr("selected",true);
EX:
版本:jquery 1.7.2
javascript:
$("#byear option[value=2011]").attr("selected",true);
============或======================
$("#下拉式選單id").attr("value","預設的值");
EX:
版本:jquery 1.4.3
javascript:
$("#byear").attr("value","2011");
html:
<select name="byear" id="byear">
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
</select>
參考資料:http://www.mokamap.com/?p=18