|
Home
|
|
Indice Javascript
|
Clock
Browser
Finestre
Status Bar
Background
Calcolatrici
Grafica ed Effetti
Convertitori
Utility
Form
Menu e Link
Modulo controllo campi vuoti
Nome
Cognome
Commento
Usa Copia e incolla questa è la sorgente
<script> <!-- Autore: Massimo Giari (webmster@massimo61.org) --> <!-- function controlla(){ var f = document.Mioform; if(f.Nome.value == ""){ alert("Inserisci il Nome !") f.Nome.focus(); return false; } if(f.Cognome.value == ""){ alert("Inserisci il Cognome !") f.Cognome.focus(); return false; } if(f.Commento.value == ""){ alert("Inserisci il tuo commento !") f.Commento.focus(); return false; } return true; } // --> </script> </head> <body> <table width="50%"> <tr> <td> <form action="Tua_Azione" name="Mioform" onSubmit="return controlla()"> <div align="center">Nome <br> <input type="text" name="Nome" size="25"> <br> Cognome<br> <input type="text" name="Cognome" size="25"> <br> Commento<br> <textarea name="Commento" cols="22" rows="5"></textarea> <br> <br> <input type="submit" value="Spedisci"> <input type="reset" value="Cancella"> </div> </form> </td> </tr> </table> <p><center> <font face="Verdana" size="-2">Free JavaScripts da<br> <a href="http://www.massimo61.org/">Free Web Upgrade</a></font> </center><p>