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"))
});

posted @ 2018-03-08 11:04  Materben  阅读(81)  评论(0编辑  收藏  举报