有什么问题请到<a href='/bbs/forums.php?fid=21'>论坛</a>中发表<br>
<!-- http://www.webjx.com -->
<!-- bbs http://www.webjx.com/bbs-->
<!--要完成此效果需要两个步骤
第一步:把如下代码加入到<head>区域中-->
<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>
<!--第二步:把如下代码加入到<body>区域中-->
<table width="30%" border="1" align="center" onMouseover="changeto('33ff33')" onMouseout="changeback('black')"
>
<tr>
<td>
<div align="center">http://www.webjx.com</div>
</td>
</tr>
<tr>
<td>
<div align="center">http://www.webjx.com</div>
</td>
</tr>
<tr>
<td>
<div align="center">http://www.webjx.com</div>
</td>
</tr>
<tr>
<td>
<div align="center">http://www.webjx.com</div>
</td>
</tr>
<tr>
<td>
<div align="center">http://www.webjx.com</div>
</td>
</tr>
</table>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]