rendered paste body<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>TR Hover</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> function init() { var trs = document.getElementById("table-id").getElementsByTagName("tr"); for (var i=0; i<trs.length; i++) { var tr = trs[i]; tr.onmouseover = function() { this.style.backgroundColor = "#FF0000"; // hover background color } tr.onmouseout = function() { this.style.backgroundColor = "#FFFFFF"; // default background color } } } </script> <style type="text/css"> th { background-color: #CCC; } </style></head><body> <table id="table-id"> <tr> <th>Column Heading 1</th> <th>Column Heading 2</th> </tr> <tr> <td>Cell</td> <td>Cell</td> </tr> <tr> <td>Cell</td> <td>Cell</td> </tr> <tr> <td>Cell</td> <td>Cell</td> </tr> <tr> <td>Cell</td> <td>Cell</td> </tr> <tr> <td>Cell</td> <td>Cell</td> </tr> </table> <script type="text/javascript">init();</script></body></html>