in reply to CGI combining javascript
function add_handlers { var rows = document.getElementsByTagName('tr'); for (var i = 0; i < rows.length; i++) { rows[i].onmouseover = function() { this.className += 'hilite'; } rows[i].onmouseout = function() { this.className = this.className.replace('hilite', ''); } } }
If onload works on tables too, you could execute the function when the table finishes loading.<body onload="add_handlers();">
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CGI combining javascript
by Anonymous Monk on Nov 17, 2005 at 15:36 UTC |