Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <head>
- <title>registrazione</title>
- </head>
- <body>
- <form id="form" action="crypt.php" method="POST">
- <input type ="email" name="email" placeholder="email" />
- <input type ="password" name="password" placeholder="password" />
- <input type="submit" name="input" value="registrati" onclick="return controllo();" />
- </form>
- </body>
- </html>
- <script>
- function controllo(){
- var form = document.getElementById('form');
- var listafigli = form.childNodes;
- var listafigli.item(0);
- var password = listafigli.item(1);
- if(password.value == "")
- {
- alert("la password non puo essere vuota");
- return false;
- }
- if(email.value == "")
- {
- alert("la mail non puo essere vuota");
- return false;
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement