codice:<html> <head> <title> Avvio sessione </title> <script language="JavaScript"> function controlla() { if(document.getElementById("cod").value == "") { alert("Inserire id"); return false; } return true; } </script> </head> <body> <form name="azione" action="controlla.jsp" method="post" onSubmit="return controlla();"> <table align="right" border="1" width="30%" height="20%"> <tr><td> <label> Inserisci Id </label> <input type="text" name="id" id="cod"> <label> Inserisci Password </label> <input type="text" name="pass" value=""> <input type="submit" value="Inserisci"> </td> </tr> </table> </form> </body> </html>

Rispondi quotando