1.
引用内容 引用内容

<script language="JavaScript1.2">

function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}
</script>
<center>
<table width="120" border="0" cellspacing="1" cellpadding="0" bgcolor="#666666" >
  <tr>
    <td bgcolor="#FFFFFF" onMouseover="changeto('#cccccc')" onMouseout="changeback('#ffffff')"> </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" onMouseover="changeto('#cccccc')" onMouseout="changeback('#ffffff')"> </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" onMouseover="changeto('#cccccc')" onMouseout="changeback('#ffffff')"> </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" onMouseover="changeto('#cccccc')" onMouseout="changeback('#ffffff')"> </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" onMouseover="changeto('#cccccc')" onMouseout="changeback('#ffffff')"> </td>
  </tr>
</table>



2.

引用内容 引用内容
<table width=300 border=1>
<tr>
<td style="cursor:hand" onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor='#cccccc'">
移過來</td>
</tr>
<tr><td style="cursor:hand" onMouseOver="this.bgColor='#ffffff'" onMouseOut="this.bgColor='#cccccc'">
移過來</td>
</tr>
</table>
posted on 2007-01-24 16:41  mbskys  阅读(748)  评论(0)    收藏  举报