<html> <head> <script language="JavaScript"> <!-- nascondiamo lo script ai vecchi browser function getname(str) { alert("Ciao, "+ str+"!"); } // fine del commento --> </script> </head> <body> Inserisci il tuo nome: <form> <input type="text" name="name" onBlur="getname(this.value)" value=""> </form> </body> </html>
.