<div class="codetitle"> <span><a style="CURSOR: pointer" data="97178" class="copybut" id="copybut97178" onclick="doCopy('code97178')"><u>复代码码</u></a></span> 代码如下:</div> <div class="codebody" id="code97178"> <br><PUBLIC:ATTACH EVENT="문서 준비" ONEVENT="doInit( )" /> <br><PUBLIC:ATTACH EVENT="onmouseover" ONEVENT="doMouseover()" /> <br><PUBLIC:ATTACH EVENT="onclick" ONEVENT="doClick()" /> <br><PUBLIC:ATTACH EVENT="onmouseout" ONEVENT="doMouseout()" /> <br><PUBLIC:PROPERTY name="test" /> <br><SCRIPT LANGUAGE="자바스크립트"> <br>var lastObj = null; <br>var lastColor = null; <br>함수 doInit(){ <br>if(element==null){ <br>return; <br>} <br>var objT = element.children[0]; <br>시도해 보세요{ <br>objT.rows(0).className="grid_title"; <br>objT.rows(1).className="grid_title"; <br>} <br>catch(err){ <br>objT.className="grid_title"; <br>} <br>objT = element.children[1]; <br>if(objT.rows(0)==null){ <br>return; <br>} <br>objT.rows(0).className="gridding1"; <br>for(i=1;i<objT.rows.length;i ){ <BR>if(i%2==1){ <BR>objT.rows(i).className="gridding1"; <BR>} <BR>else{ <BR>objT.rows(i).className="gridding1"; <BR>} <BR>} <BR>} <BR>function doClick(){ <BR>if(event.srcElement.tagName=="TD"){ <BR>var curObj = event.srcElement.parentElement; <BR>if(curObj.rowIndex==0) 반환 false; <BR>시도{ <BR>if(curObj.children[0].children.length == 0 ) return false; <BR>} <BR>catch(err){ <BR>return false; <BR>} <BR>if(curObj.children[0].children[0].checked){ <BR>curObj.children[0].children[0].checked = false; <BR>} <BR>else{ <BR>lastObj = curObj; <BR>lastColor = "#FFFFFF"; <BR>curObj.children[0].children[0].checked = true; <BR>} <BR>} <BR>if(event.srcElement.tagName =="INPUT"){ <BR>try{ <BR>var curObj = event.srcElement.parentElement.parentElement; <BR>if(curObj.rowIndex==0) { <BR>var obj = curObj.parentElement.parentElement; <BR>for(i=1;i<obj.rows.length;i ){ <BR>if(obj.rows(0).children[0].children[0].checked){ <BR>obj. 행(i).children[0].children[0].checked = true; <BR>obj.rows(i).style.BackgroundColor="#FFFFFF"; <BR>obj.rows(i).style.color="#000000"; <BR>} <BR>else{ <BR>obj.rows(i).children[0].children[0].checked = false; <BR>if(i%2==1){ <BR>obj.rows(i).style.BackgroundColor="#FFFFFF"; <BR>obj.rows(i).style.color="#000000"; <BR>} <BR>else{ <BR>obj.rows(i).style.BackgroundColor="#FFFFFF"; <BR>obj.rows(i).style.color="#000000"; <BR>} <BR>} <BR>} <BR>} <BR>} <BR>catch(err){ <BR>return true; <BR>} <BR>} <BR>} <BR>function doMouseover(){ <BR>if( event.srcElement.tagName=="TD"){ <BR>var curObj = event.srcElement.parentElement; <BR>if(curObj.rowIndex==0) 반환 false; <BR>curObj.style.BackgroundColor="#F2FFEE"; <BR>} <BR>if( event.srcElement.tagName=="INPUT"){ <BR>var curObj = event.srcElement.parentElement.parentElement; <BR>if(curObj.rowIndex==0) 반환 false; <BR>curObj.style.BackgroundColor="#F2FFEE"; <BR>} <BR>} <BR>function doMouseout(){ <BR>if(event.srcElement.tagName=="TD"){ <BR>var curObj = event.srcElement.parentElement; <BR>if(curObj.rowIndex==0) 반환 false; <BR>시도해 보세요{ <BR>if(curObj.children[0].children.length == 0 ) { <BR>if(curObj.rowIndex%2==1){ <BR>curObj.style.BackgroundColor=" #FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>else{ <BR>curObj.style.BackgroundColor="#FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>true를 반환합니다. <BR>} <BR>} <BR>catch(err){ <BR>if(curObj.rowIndex%2==1){ <BR>curObj.style.BackgroundColor="#FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>else{ <BR>curObj.style.BackgroundColor="#FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>true를 반환합니다. <BR>} <BR>if(curObj.rowIndex%2==1) <BR>if(curObj.children[0].children[0].checked){ <BR>curObj.style.BackgroundColor="#FFFFFF "; <BR>curObj.style.color="#000000"; <BR>} <BR>else{ <BR>curObj.style.BackgroundColor="#FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>else <BR>if(curObj.children[0].children[0].checked){ <BR>curObj.style.BackgroundColor="#FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>else{ <BR>curObj.style.BackgroundColor="#FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>} <BR>if(event.srcElement.tagName=="INPUT"){ <BR>var curObj = event.srcElement.parentElement.parentElement; <BR>if(curObj.rowIndex==0) 반환 false; <BR>시도해 보세요{ <BR>if(curObj.rowIndex%2==1){ <BR>if(curObj.children[0].children[0].checked){ <BR>curObj.style.BackgroundColor=" #FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>else{ <BR>curObj.style.BackgroundColor="#FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>} <BR>else{ <BR>if(curObj.children[0].children[0].checked){ <BR>curObj.style.BackgroundColor="#FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>else{ <BR>curObj.style.BackgroundColor="#FFFFFF"; <BR>curObj.style.color="#000000"; <BR>} <BR>} <BR>} <BR>catch(err){ <BR>return true; <BR>} <BR>} <BR>} <BR></SCRIPT><br> </div>