<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">

/**全选*/
$("#checkAll").click(function(){
  if($("#checkAll").is(":checked")){
    $("input:checkbox:not('#checkAll')").each(function(){
      $(this).attr("checked",true);
      $(this).prop("checked",true);
    });
  }else{
    $("input:checkbox:not('#checkAll')").each(function(){
      $(this).attr("checked",false);
      $(this).prop("checked",false);
    });
  }
});


</script>
<body>
<div>
<input type="checkbox" name="checkAll" />
</div>
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-01-24
  • 2022-12-23
  • 2021-11-27
  • 2021-12-05
  • 2022-12-23
  • 2021-10-01
猜你喜欢
  • 2021-11-01
  • 2021-11-01
  • 2022-12-23
  • 2021-12-05
  • 2021-12-30
  • 2021-05-27
相关资源
相似解决方案