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>

 

分类:

技术点:

相关文章:

  • 2022-01-25
  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-05-29
猜你喜欢
  • 2021-12-05
  • 2021-12-05
  • 2021-11-28
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案