我的js
alert(habBefore) ;能得出正确值 0或1、2、3
$(this).children("option[value='"+habBefore+"']").attr("selected",true) ;火狐不报错但没什么反应
alert($(this).children("option[value='"+habBefore+"']").val()) ;出现undefined
this是代表着select,option的个数不一定 3或4个。
所以想问下怎么弄
推荐回答
还没有选出推荐答案,请稍候访问或查看其他回答!