摘要:
设置当前值选中:1:遍历 str = xxx; $("#xxx option").each(function(){if($(this).text() == str){ $(this).attr("selected",true); } }); 同理根据val str = xxx; $("#xxx option").each(function(){if($(this).val() == str){ $(this).attr("selected",true); } }); 2:利用选择器:$("#x... 阅读全文
posted @ 2013-01-10 13:44
s_p
阅读(263)
评论(0)
推荐(0)

浙公网安备 33010602011771号