CAMBIA COLORE ALLO SFONDO

Perché non dare la scelta all'utente del colore dello sfondo ? Diamogli l'opportunità di scegliere tra 16 colori predefiniti dal webmaster. In frontpage si può inserire uno dei 16 colori, nella solita maniera, "formato" "sfondo" oppure lasciare il foglio bianco, il codice dei colori và inserito in forma esadecimale. Prova ora  a passare con il mouse sopra i colori, e vedrai che lo sfondo cambia.

RITORNA ALLA PAGINA DELLE JAVASCRIPT

RITORNA ALLA PAGINA DELLE ALTRE JAVASCRIPT

utenti connessi

IL PRIMO SCRIPT DA INSERIRE IN HTML

<script language="JavaScript">
lck=0;
function r(hval)
{
if ( lck == 0 )
{
document.bgColor=hval;
}
}
function l()
{
if (lck == 0)
{
lck = 1;
}
else
{
lck = 0;
}
}
</script>

IL SECONDO SCRIPT DA INSERIRE IN HTML

<div align="center">
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0">
<tr>
<td>
<table border="0" cellpadding="0" border="0">
<tr>
<td bgcolor="#CCFFFF"><a href="JavaScript:l()" onmouseover="r('#CCFFFF'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#37B9FF"><a href="JavaScript:l()" onmouseover="r('#37B9FF'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#9CD694"><a href="JavaScript:l()" onmouseover="r('#9CD694'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td> 
<td bgcolor="#99CCFF"><a href="JavaScript:l()" onmouseover="r('#99CCFF'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td></tr><tr>
<td bgcolor="#FF0000"><a href="JavaScript:l()" onmouseover="r('#FF0000'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#FFB935"><a href="JavaScript:l()" onmouseover="r('#FFB935'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#000000"><a href="JavaScript:l()" onmouseover="r('#000000'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#CC6600"><a href="JavaScript:l()" onmouseover="r('#CC6600'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td></tr><tr>
<td bgcolor="#CC3399"><a href="JavaScript:l()" onmouseover="r('#CC3399'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#666699"><a href="JavaScript:l()" onmouseover="r('#666699'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#660033"><a href="JavaScript:l()" onmouseover="r('#660033'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#FFFFFF"><a href="JavaScript:l()" onmouseover="r('#FFFFFF'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td></tr><tr>
<td bgcolor="#333300"><a href="JavaScript:l()" onmouseover="r('#333300'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#9900CC"><a href="JavaScript:l()" onmouseover="r('#9900CC'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#FFCC66"><a href="JavaScript:l()" onmouseover="r('#FFCC66'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
<td bgcolor="#8FBC8F"><a href="JavaScript:l()" onmouseover="r('#8FBC8F'); return true"><img src="/images/qua.gif" border="0" width="10" height="10"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>