<select id="mySelect"> <option id="sel01" value="some value">some value</option> <option id="sel02" value="some other value">some other value</option> <option id="sel03" value="maybe me">maybe me</option> <option id="sel04" value="and another one">and another one</option> </select>
我想选择一个使用jQuery的选项,但不是按值:
$("#mySelect").val(1);
但是由元素id.
谢谢你的回答.