codice:
<style>
.on { background-color: white; }
.off { background-color: yellow; }
</style>
...
<script>
function change(row,style) {
for (var i=1; i<=3; i++) {
document.getElementById(row+i).className=style;
}
}
</script>
...
<table>
<tr>
<td id="a1" onMouseOver="change('a','on');" onMouseOut="change('a','off');" style="off"></td>
<td id="a2" onMouseOver="change('a','on');" onMouseOut="change('a','off');" style="off"></td>
<td id="a3" onMouseOver="change('a','on');" onMouseOut="change('a','off');" style="off"></td>
</tr>
<tr>
<td id="b1" onMouseOver="change('b','on');" onMouseOut="change('b','off');" style="off"></td>
<td id="b2" onMouseOver="change('b','on');" onMouseOut="change('b','off');" style="off"></td>
<td id="b3" onMouseOver="change('b','on');" onMouseOut="change('b','off');" style="off"></td>
</tr>
<tr>
<td id="c1" onMouseOver="change('c','on');" onMouseOut="change('c','off');" style="off"></td>
<td id="c2" onMouseOver="change('c','on');" onMouseOut="change('c','off');" style="off"></td>
<td id="c3" onMouseOver="change('c','on');" onMouseOut="change('c','off');" style="off"></td>
</tr>
</table>
se funziona sono molto contento.
non l'ho provato, e' solo un'ideuccia che ritengo carina.