lamp01
<input type="checkbox" id="all" />全选<br />  
<input type="checkbox" name="permission" />添加权限<br />  
<input type="checkbox" name="permission" />修改权限<br />  
<input type="checkbox" name="permission" />权限列表<br />  
<script>
    $("#all").on(\'click\',function() {
        $("input[name=\'permission\']").prop("checked", this.checked);
    });

    $("input[name=\'permission\']").on(\'click\',function() {
        var $subs = $("input[name=\'permission\']");
        $("#all").prop("checked" , $subs.length == $subs.filter(":checked").length ? true :false);
    });
</script>

 

分类:

技术点:

相关文章:

  • 2021-11-01
  • 2021-05-29
  • 2021-12-16
  • 2021-12-27
  • 2021-12-15
  • 2021-10-19
  • 2021-05-10
  • 2021-07-01
猜你喜欢
  • 2021-11-01
  • 2021-12-05
  • 2021-12-15
  • 2021-09-09
  • 2021-09-09
  • 2021-11-01
相关资源
相似解决方案