Ejemplos en Javascript

<HTML>
<HEAD>

<TITLE>Ejemplos Javascript: ejemplo pr???¡ctico </TITLE>



</HEAD>

<BODY bgcolor="white">

 

<SCRIPT LANGUAGE="JavaScript">


    function sfondo(colore) {document.bgColor = colore;}


</script>



<CENTER><FORM>


<INPUT TYPE="button" VALUE="Rosso" onClick="sfondo('RED')">

<INPUT TYPE="button" VALUE="Blue" onClick="sfondo('BLUE')">

<INPUT TYPE="button" VALUE="Arancio" onClick="sfondo('ORANGE')">

<INPUT TYPE="button" VALUE="Verde" onClick="sfondo('GREEN')">

<INPUT TYPE="button" VALUE="Nero" onClick="sfondo('BLACK')">

<INPUT TYPE="button" VALUE="Grigio" onClick="sfondo('GRAY')">

<INPUT TYPE="button" VALUE="Giallo" onClick="sfondo('YELLOW')">

<INPUT TYPE="button" VALUE="bianco" onClick="sfondo('WHITE')">

</FORM>


</body>
</html>

Background y fondo