function SelectAll() { for(i=0;i <window.document.forms[0].length;i++) if(window.document.forms[0].elements[i].type.toString()='checkbox' window.document.forms[0].elements[i].checked='true' ;} 转载于:https://www.cnblogs.com/Hawk-Hong/archive/2006/12/21/598776.html