function CheckAll(form,str){ var obj; obj = document.getElementById(str); for (var i=0;i<form.elements.length;i++) { form.elements[i].checked = obj.checked; }}function unselectall(){ var obj; obj = document.getElementById("allchk"); if(obj.checked) { obj.checked = obj.checked&0; }}<label><input id="allchk" name="allchk" onclick="CheckAll(this.form,this.name);" type="checkbox" />全 选</label> |