<script type="text/javascript">
//全选
function checkAll() {
var objs = window.document.getElementsByTagName("input");
for(var i=0;i<objs.length;i++){
if (objs[i].type == "checkbox" && objs[i].disabled==false){
objs[i].checked = true;
}
}
}
//反选
function switchAll() {
var objs = window.document.getElementsByTagName("input");
for(var i=0;i<objs.length;i++){
if (objs[i].type == "checkbox" && objs[i].disabled==false){
objs[i].checked = !objs[i].checked;
}
}
}
</script>