Esempio veloce:
codice:<head> <script> function verifica(){ var Psw = document.getElementById("password").value var ConfPsw = document.getElementById("confermapassword").value if(Psw!=ConfPsw){ alert("password e conferma discordanti"); return false; } } </script> </head> <body> <form name="MyForm" method="post" action="tuapagina.xxx"> <input type="password" name="password" id="password" /> <input type="password" name="confermapassword" id="confermapassword" /> <input name="Pulsante" type="button" value="Pulsante" onclick="verifica()" /> </form> </body>![]()

Rispondi quotando