Using hover: on your tr elements as JPnyc suggests would work on Firefox (but not IE)...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Page title</title>
<style type="text/css">
<!--
tr.odd{background-color:white;}
tr.even{background-color:red;}
tr:hover{background-color:blue;}
-->
</style>
</head>
<body>
<table>
<tr class="odd"><td>This</td></tr>
<tr class="even"><td>This</td></tr>
<tr class="odd"><td>This</td></tr>
<tr class="even"><td>This</td></tr>
<tr class="odd"><td>This</td></tr>
<tr class="even"><td>This</td></tr>
</table>
</body>
</html>
Note that the only thing that changes from row to row is the class attribute. Perhaps combining this with the IE workaround...
(Thinks: in an ideal world CSS3 would be sufficiently supported that the styles would be
tr:nth-child(2n){background-color:red;}
tr:nth-child(2n+1){background-color:white;}
tr:hover{background-color:blue;}
and there wouldn't need to be any server code needed (or client code, for that matter) to make table rows alternate in colour. We live in hope, eh? Unthinks.)
Edit: In Javascript You can give new properties to existing objects just by saying so....
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Page title</title>
<style type="text/css">
<!--
tr.odd{background-color:white;}
tr.even{background-color:red;}
-->
</style>
</head>
<body>
<table>
<tr class="odd" onmouseover="this.oldBackgroundColor=this.style.backgroundColor;this.style.backgroundColor='blue'" onmouseout="this.style.backgroundColor=this.oldBackgroundColor"><td>This</td></tr>
<tr class="even" onmouseover="this.oldBackgroundColor=this.style.backgroundColor;this.style.backgroundColor='blue'" onmouseout="this.style.backgroundColor=this.oldBackgroundColor"><td>This</td></tr>
<tr class="odd" onmouseover="this.oldBackgroundColor=this.style.backgroundColor;this.style.backgroundColor='blue'" onmouseout="this.style.backgroundColor=this.oldBackgroundColor"><td>This</td></tr>
<tr class="even" onmouseover="this.oldBackgroundColor=this.style.backgroundColor;this.style.backgroundColor='blue'" onmouseout="this.style.backgroundColor=this.oldBackgroundColor"><td>This</td></tr>
<tr class="odd" onmouseover="this.oldBackgroundColor=this.style.backgroundColor;this.style.backgroundColor='blue'" onmouseout="this.style.backgroundColor=this.oldBackgroundColor"><td>This</td></tr>
<tr class="even" onmouseover="this.oldBackgroundColor=this.style.backgroundColor;this.style.backgroundColor='blue'" onmouseout="this.style.backgroundColor=this.oldBackgroundColor"><td>This</td></tr>
</table>
</body>
</html>
It gets tedious repeating the same mouseover/mouseout code over and over, and monumentally ugly to boot - especially if you want to change more than one style aspect. So employ the old programming rule of thumb: if it's worth doing twice it's worth writing a program for.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Page title</title>
<style type="text/css">
<!--
tr.odd{background-color:white;}
tr.even{background-color:red;}
-->
</style>
<script language="JavaScript" type="text/javascript">
<!--
function over(row)
{
row.oldBackgroundColor = row.style.backgroundColor;
row.style.backgroundColor = 'blue';
}
function out(row)
{
row.style.backgroundColor = row.oldBackgroundColor;
}
//-->
</script>
</head>
<body>
<table>
<tr class="odd" onmouseover="over(this);" onmouseout="out(this);"><td>This</td></tr>
<tr class="even" onmouseover="over(this);" onmouseout="out(this);"><td>This</td></tr>
<tr class="odd" onmouseover="over(this);" onmouseout="out(this);"><td>This</td></tr>
<tr class="even" onmouseover="over(this);" onmouseout="out(this);"><td>This</td></tr>
<tr class="odd" onmouseover="over(this);" onmouseout="out(this);"><td>This</td></tr>
<tr class="even" onmouseover="over(this);" onmouseout="out(this);"><td>This</td></tr>
</table>
</body>
</html>