$(this).attr('selected',);

改为

$(this).prop('selected');


*JQuery版本1.9.1

*attr在JQuery1.5.2版本中正常使用,在JQuery1.9.1中一直得到undefined,改为prop正常使用

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐