原因:

jQuery API明确说明,1.6+的jQuery要用prop,不能用attr否则无效,尤其是checkBox的checked的属性的判断。

checkbox属性checked="checked"但状态不是勾选状态的解决办法

 

解决办法:

$('#QdConsume input[type=checkbox]').attr('checked',true); 改为  $('#QdConsume input[type=checkbox]').prop('checked',true);


更多详细:

firefox中 checkbox属性checked="checked"已有,但复选框却不显示打钩的原因

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-04
  • 2022-12-23
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案