checkbox全选和反选

 $("#CheckBox").click(function () {
                if (this.checked) {
                    $("input[type='CheckBox']").each(function () { this.checked = true; });
                } else {
                    $("input[type='CheckBox']").each(function () { this.checked = false; });
                }
            })
posted @ 2014-11-26 13:26  You最温暖的港湾  阅读(150)  评论(0)    收藏  举报