使用jquery动态操纵DOM的时候在IE下会遇到remvoeAttr() 不生效的问题,

解决的办法是使用prop()方法:

var node = $("div>input");
node.each(function(){
//node.removeAttr('readonly');
$(node).prop("readonly",false);//用removeAttr在IE下不生效,改用prop()
});

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2022-12-23
  • 2021-06-28
  • 2021-05-01
  • 2022-01-08
  • 2021-09-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
相关资源
相似解决方案