Forum Moderators: not2easy
<script language="JavaScript" type="text/javascript">
<!--
function chc() {
var tables = document.getElementsByTagName("table");
for(var a = 0; a < tables.length; a++) {
var tds = tables[a].getElementsByTagName("td");
for(var b = 0; b < tds.length; b++) {
var tdd;
if(navigator.appName == 'Microsoft Internet Explorer') {
tdd = tds[b].attributes["class"].value
}
else {//FF, Opera
tdd = tds[b].getAttribute("class")
}
if(tdd == 'ch') {
tds[b].style.backgroundColor = "#f00";
}
}
}
}
// -->
</script>
</head>
<body>
<table width="100%" cellspacing="2" border="2">
<tr><td class="ch" onmouseover="chc()">1</td><td>2</td><td>3</td></tr>
<tr><td>4</td><td>5</td><td class="ch" onmouseover="chc()">6</td></tr>
</table>
<br>
<table width="100%" cellspacing="2" border="2">
<tr><td class="ch" onmouseover="chc()">1</td><td>2</td><td>3</td></tr>
<tr><td>4</td><td>5</td><td class="ch" onmouseover="chc()">6</td></tr>
</table>
</body>
</html>
Browser sniffing is not good thing here, but you'll get the idea.