removeAttr() not removing “disabled” attribute in IE

前端 未结 3 884
后悔当初
后悔当初 2020-12-03 07:17
var disableSelection = function(){
    $(\"#elementId\").attr(\"disabled\",\"disabled\");    
};

var enableSelection = function(){
    $(\"#elementId\").removeAttr(         


        
3条回答
  •  -上瘾入骨i
    2020-12-03 07:37

    You can use removeProp('disabled') instead. It worked for me while removeAttr('disabled') didn't.

提交回复
热议问题