复主代码代码如下: <머리> 无标题文档 <br>function selectAllDels() <br>{ <br>var allCheckBoxs = document.getElementsByName("preDelCheck"); <br>var desc = document.getElementById("allChecked"); <br>var selectOrUnselect=false; <br>for(var i = 0; i < allCheckBoxs.length; i ) <br />{ <br />if(allCheckBoxs[i].checked){ <br />selectOrUnselect=true; <br />휴식; <br />} <br />} <br />if (selectOrUnselect) <br />{ <br />_allUnchecked(allCheckBoxs); <br />}else <br />{ <br />_allchecked(allCheckBoxs); <br />} <br />} <br />function _allchecked(allCheckBoxs){ <br />for(var i = 0; i < allCheckBoxs.length; i ) <br />{ <br />allCheckBoxs[i].checked = 진실; <br />} <br />} <br />function _allUnchecked(allCheckBoxs){ <br />for(var i = 0; i < allCheckBoxs.length; i ) <br />{ <br />allCheckBoxs[i].checked = 거짓; <br />} <br />} <br /> <본문> 테스트 <양식> ID1 ID2 ID3 ID4 ID5