Celle di un tabella che cambiano colore al passaggio del mouse.
<HTML><HEAD><TITLE>titolo</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<SCRIPT language=JavaScript1.2>
function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor)
source.style.backgroundColor=highlightcolor
}
function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement))
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}
</SCRIPT>
<BODY>
<BR><BR><BR>Prova a passare con il mouse sopra le parole "TESTO1" e "TESTO2" che
trovi qui sotto.<BR><BR>
<TABLE onmouseover="changeto('lightgreen')" onmouseout="changeback('white')">
<TBODY>
<TR>
<TD>TESTO1</TD>
<TD>TESTO2</TD></TR></TBODY></TABLE>
</BODY></HTML>