$(this).attr('selected',);
改为
$(this).prop('selected');
*JQuery版本1.9.1
*attr在JQuery1.5.2版本中正常使用,在JQuery1.9.1中一直得到undefined,改为prop正常使用
$(this).attr('selected',);
改为
$(this).prop('selected');
*JQuery版本1.9.1
*attr在JQuery1.5.2版本中正常使用,在JQuery1.9.1中一直得到undefined,改为prop正常使用