jQuery下使用removeAttr时,在IE8以下版本中会出现属性移除不了的问题,现象是移除以后,仍然显示为disabled的状态,但文本框可录入,按钮可点击,严重的是,数据提交不了。

修正的方法是使用prop方法,如

$('#needDisabledElem').prop("disabled", true); 

$('#removeDisabledStatus').prop("disabled", false); 

详细参见:http://stackoverflow.com/questions/7677886/ie7-ie8-interaction-with-jquery-removeattrdisabled-not-applying-css

 

转载自:http://blog.csdn.net/anmo/article/details/7586723

posted on 2013-01-04 11:09  elycir  阅读(263)  评论(0)    收藏  举报