Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <style>
- form
- {
- margin: 0 auto;
- width : 100%;
- text-align: center;
- }
- </style>
- <div>
- <form action="chooseDepartment.php" method="post" onsubmit="return validateForm()">
- Username:
- <br>
- <input type="text" name="username" placeholder="your username " id = "username" >
- <br>
- Password:
- <br>
- <input type="password" name="password" placeholder = "your password" >
- <br>
- E-mail:
- <br>
- <input type = "email" placeholder="your e-mail" >
- <br>
- <br>
- <input type="submit" value="Register" >
- <br>
- </form>
- </div>
- <head>
- <title>Sign-up_page</title>
- <script type="text/javascript">
- function validateForm(){
- var username = document.getElementById("username").value;
- var password = document.getElementById("password").value;
- var e-mail = document.getElementById("e-mail").value;
- if(username == null || username == ""){
- alert("Enter your first name! ");
- return false;
- }
- else if(password == null || password == ""){
- alert("Enter your password ");
- return false;
- }
- else if (e-mail == null || e-mail == "")
- {
- alert("Enter your e-mail! ");
- return false;
- }
- else return true;
- }
- </script>
- </head>
- <body>
- <h1></h1>
- <p></p>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement