<input type="checkbox" onclick="checkAll(this, 'NewMainVideoCheckbox1')">
function checkAll(e, name) {
var items = document.getElementsByName(name);
for (var i = 0; i < items.length; i++) {
items[i].checked = e.checked;
}
}
记录一下,以后最好还是不要依赖jquery