jquery怎么设置select选中某项值?jqueryselect怎么设置,有默认的选中值,但是不能选择?
).val("$("#select option[value=']").prop("",selected");在线实例演示;<?select id="select_disable">/option><$("#select_disable").attr("disabled";
jquery怎么设置select选中某项值?
//方法一://比如要选中值为aijquery的选项:$("#select").val("aijquery")
; //方法二:$("#select option[value='aijquery']").prop("selected","selected");在线实例演示:jquery动态选中select下拉框里指定值的optilon选项的两种方法及在线实例演示
jqueryselect怎么设置,有默认的选中值,但是不能选择?
<body> <select id="select_disable"> <option value="1">1</option> <option value="2">1</option> <option value="3">1</option> <select></body>
<script>$("#select_disable").attr("disabled","disabled").css("background-color","#EEEEEE");</script>
0