//全选,取消全选
            $(document).on("click","#selection",function(){
                if($(this).hasClass("selected")==false){
                    $(this).closest(".tablesWrap").find("input[type=checkbox]").prop("checked",true);
                    $(this).addClass("selected");
                }else{
                    $(this).closest(".tablesWrap").find("input[type=checkbox]").prop("checked",false);
                    $(this).removeClass("selected");
                }
            });
 
 
.tablesWrap便是包含所有复选框的类名。

相关文章:

  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-07-31
猜你喜欢
  • 2021-12-08
  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
  • 2021-08-14
  • 2023-03-14
  • 2021-10-01
相关资源
相似解决方案