<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><attach event="ondocumentready" onevent="doInit()"></attach> <br><attach event="onmouseover" onevent="doMouseover()"></attach> <br><attach event="onclick" onevent="doClick()"></attach> <br><attach event="onmouseout" onevent="doMouseout()"></attach> <br><property name="test"></property> <br><script language="JavaScript"> <BR>var lastObj = null; <BR>var lastColor = null; <BR>function doInit(){ <BR>if(element==null){ <BR>return; <BR>} <BR>var objT = element.children[0]; <BR>try{ <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) return false; <BR>try{ <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.rows(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) return 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) return 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) return false; <BR>try{ <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>return 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>return 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) return false; <BR>try{ <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>