$(document).ready(function() {

$("#isalldebt").click(function()
{
if ($(this).attr("checked")) { // 全选 

$("input[name='debt_type']").each(function(){ 
$(this).attr("checked", true); 
}); 
}
else { // 取消全选 

$("input[name='debt_type']").each(function(){ 
$(this).attr("checked", false); 
}); 
}
});


});

=======================下面html代码 

 

<input >

<input >

<input >
 

<input type="checkbox" > 
<label for="isalldebt" onclick="isalldebt()" >全选</label>

 

 

 

相关文章:

  • 2022-02-23
  • 2021-09-27
  • 2022-12-23
  • 2021-10-12
  • 2021-12-27
  • 2021-05-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案