<!DOCTYPE HTML PUBLIC "//WC//DTD HTML Transitional//EN">
<html>
<head>
<script>
function overIt(){
var the_obj = eventsrcElement;
if(the_objtagNametoLowerCase() == "td"){
the_obj=the_objparentElement;
the_objoBgc=the_objcurrentStylebackgroundColor;
the_objoFc=the_objcurrentStylecolor;
the_objstylebackgroundColor=#BAF;
the_objstylecolor=;
}
}
function outIt(){
var the_obj = eventsrcElement;
if(the_objtagNametoLowerCase() == "td"){
the_obj=the_objparentElement;
the_objstylebackgroundColor=the_objoBgc;
the_objstylecolor=the_objoFc;
the_objstyletextDecoration=;
}
}
</script>
</head>
<body>
<table border= width= onmouseover="overIt()" onmouseout="outIt()">
<tr bgColor=#>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
</tr>
<tr bgColor=#>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
</tr>
<tr bgColor=#>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
</tr>
<tr bgColor=#>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td></tr>
<tr bgColor=#>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
<td>aaa</td>
</tr>
</table>
</body>
</html>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19898.html