jQuery实现CheckBox全选、全不选

var flag = $(this).attr("checked");
                $(
"[name=subBox]:checkbox").each(function() {
                    $(
this).attr("checked", flag);
                })
原文地址:https://www.cnblogs.com/mengrulsy/p/2411190.html