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-06-22
  • 2021-05-10
  • 2021-07-01
  • 2022-01-13
  • 2021-12-05
  • 2021-07-14
  • 2022-01-10
  • 2021-10-01
猜你喜欢
  • 2021-12-05
  • 2021-12-05
  • 2022-01-25
  • 2021-05-29
  • 2021-12-24
  • 2021-12-27
相关资源
相似解决方案