js 记录

1、table中checkbox选中所有下面的checkbox都选中或不选中代码

$("table thead th input:checkbox").on("click", function () {
$(this).closest("table").find("tr > td:first-child input:checkbox").prop("checked", $("table thead th input:checkbox").prop("checked"))
});

原文地址:https://www.cnblogs.com/liangwenchao-912/p/8527186.html