Hallo,
so könnte es funktionieren
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Unbenanntes Dokument</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.red {
background-color: red
}
.blue{
background-color:blue
}
</style>
<script type="text/javascript">
<!--
function mark(cell)
{
for(i=0; i <
document.getElementById("tbl").getElementsByTagName("td").length; i++)
{
document.getElementById("tbl").getElementsByTagName("td")[i].className="blue";
}
cell.className="red";
}
//-->
</script>
</head>
<body>
<table width="600" border="0" cellspacing="0" cellpadding="0" id="tbl">
<tr>
<td class="blue" onclick="mark(this)">sdsdsd</td>
<td class="blue" onclick="mark(this)">dsdsdsd</td>
<td class="blue" onclick="mark(this)">dsdsds</td>
<td class="blue" onclick="mark(this)">dsdsdsds</td>
</tr>
</table>
</body>
</html>
Gruß!