$(".checkall").click(function () {
if (this.checked) {
$("input[name='isBuy']").each(function () { this.checked = true; });
} else {
$("input[name='isBuy']").each(function () { this.checked = false; });
}
});
转载于:https://www.cnblogs.com/whlhaikuotiankong/p/3419524.html