1. 全选复选框:
1 //复选框全选函数 2 function SelectAll() { 3 var checkAll = document.getElementsByName("checkAll"); 4 var checks = document.getElementsByName("proCheck"); 5 for (var i = 0; i < checks.length; i++) { 6 checks[i].checked = checkAll.item(0).checked; 7 } 8 }