Questo è il mio sorgente
codice:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> #cella1:hover { background-color: white; margin: 5 px; } #cella2:hover { background-color: white; margin: 5 px; } #cella3:hover { background-color: white; margin: 5 px; } #cella4:hover { background-color: white; margin: 5 px; } #cella5:hover { background-color: white; margin: 5 px; } #cella6:hover { background-color: white; margin: 5 px; } #cella7:hover { background-color: white; margin: 5 px; } #cella8:hover { background-color: white; margin: 5 px; } </style> <script type="text/javascript"> function cambia1(){ document.getElementById("cella1").innerHTML="Rillo 1"; } function cambia2(){ document.getElementById("cella2").innerHTML="Rillo 2"; } function cambia3(){ document.getElementById("cella3").innerHTML="Rillo 3"; } function cambia4(){ document.getElementById("cella4").innerHTML="Rillo 4"; } function cambia5(){ document.getElementById("cella5").innerHTML="Rillo 5"; } function cambia6(){ document.getElementById("cella6").innerHTML="Rillo 6"; } function cambia7(){ document.getElementById("cella7").innerHTML="Rillo 7"; } function cambia8(){ document.getElementById("cella8").innerHTML="Rillo 8"; } </script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Documento senza titolo</title> </head> <body bgcolor="#0033FF"> <center> <table height="500" border="2" bordercolor="white" width="800" bgcolor="#FFFFFF" > <tr> <td valign="top"> <center> <font color="#0033FF" face="book antiqua" size="+4">SAITEC</font></center> <center><font color="#0033FF" face="book antique" size="+2 "> di Salvatore Di Raimondo </font> </center> <table border="2" bordercolor="white" width="800" height="300" background="lago_diga.png" cellspacing="0"> <tr> <TD width="200" id="cella1" onmouseover=cambia1(); > </TD> <TD width="200" id="cella2" onmouseover=cambia2();></TD> <TD width="200" id="cella3" onmouseover=cambia3();></TD> <TD width="200" id="cella4" onmouseover=cambia4();></TD> </tr> <tr> <TD width="200" id="cella5" onmouseover=cambia5();></TD> <TD width="200" id="cella6" onmouseover=cambia6();></TD> <TD width="200" id="cella7" onmouseover=cambia7();></TD> <TD width="200" id="cella8" onmouseover=cambia8();></TD> </tr> </table> <font face="book antiqua" size="+2" color="#0033FF"> Benvenuti nel sito ufficiale</font>                                 [img]entra (1).gif[/img] </td> </tr> </table> </center> </body> </html>
Ho inserito una tabella ed ho messo uno sfondo per creare l'effetto puzzle con le celle.
Il problema è che quando il mouse passa sopra la cella, quest'ultima deve diventare bianca e comparire una scritta. Questo sono riuscito a farlo, il problema è tornare indietro.
Cioè quando il mouse se ne va dalla cella deve andarsene la scritta e tornare la vecchia immagina....come posso farlo?

Rispondi quotando