#javascript-css-row-color-script.js / js
/* To use with lists, just change document.getElementsByTagName('tr'); to document.getElementsByTagName('li'); */ window.onload = colorRows; function colorRows() { var myTR = document.getElementsByTagName('tr'); for (var i=0;i<myTR.length;i++) { if (i%2) { myTR[i].className = 'rowTint'; } } }
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.