Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.73 KB | None | 0 0
  1. <!DOCTYPE html>
  2.  <head>
  3.  <title>registrazione</title>
  4.  </head>
  5.  <body>
  6.  <form id="form" action="crypt.php" method="POST">
  7. <input type ="email" name="email" placeholder="email" />
  8. <input type ="password" name="password" placeholder="password" />
  9. <input type="submit" name="input" value="registrati" onclick="return controllo();" />
  10. </form>
  11. </body>
  12. </html>
  13.  
  14. <script>
  15.  
  16. function controllo(){
  17. var form = document.getElementById('form');
  18. var listafigli = form.childNodes;
  19. var listafigli.item(0);
  20. var password = listafigli.item(1);
  21.  
  22. if(password.value == "")
  23. {
  24. alert("la password non puo essere vuota");
  25. return false;
  26. }
  27.  
  28. if(email.value == "")
  29. {
  30. alert("la mail non puo essere vuota");
  31. return false;
  32. }
  33. }
  34. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement