-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.html
33 lines (32 loc) · 930 Bytes
/
signup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<html>
<body>
<script type=""text/javascript">
function signup(){
var username = document.getElementById("uname").value;
var p1 = document.getElementById("password1").value;
var p2 = document.getElementById("password2").value;
if((username==null) || (username=="")){
alert("Username cannot be blank");
return false;
}
if((p1 == null) || (p1 == "") || (p2 == null) || (p2 == "")){
alert("Enter Password");
return false;
}
if(p1==p2){
return true;
}
else{
alert("Both the passwords should be same.");
return false;
}
}
</script>
<form action="login_page.html" onsubmit = "return signup()">
Username: <input id = "uname" placeholder="Username" type="text" /></br>
Password: <input id = "password1" placeholder = "Password" type="password" /></br>
Re-enter Password:<input id="password2" placeholder = "Re-enter Password" type="password" /></br>
<button type="submit">Submit</button>
</form>
</body>
</html>