<input type="checkbox" name="" id="checkAllChange" value=""> <input type="checkbox" class="userid" name="id[]" value="">
<input type="checkbox" class="userid" name="id[]" value="">
<input type="checkbox" class="userid" name="id[]" value="">
<script>
// 全选/取消全部
$("#checkAllChange").click(function() {
if (this.checked == true) {
$(".userid").each(function() {
this.checked = true;
});
} else {
$(".userid").each(function() {
this.checked = false;
});
}
});
</script>