$("#selectche_type option").each(function(){//用id ,用class好像不得,不知道为何 alert(2) if($(this).val()==che_type){ alert("jinlai") $(this).attr("selected",true); } });
jq控制select值为某个时选中
原文:http://www.cnblogs.com/weiyiyong/p/7742448.html