-
Notifications
You must be signed in to change notification settings - Fork 0
/
signUp.html
53 lines (42 loc) · 1.38 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<style>
fieldset { width: 30% ; }
.A { background: #FFFF99; width: 125px; float: left; }
.B { background: #FFFF99; width: 80px; float: right; }
.C { background: #FFFF99; width: 10px; float: right; }
</style>
<form action="signUp.php" onsubmit="comparewords()" method=post>
<fieldset> <legend>Sign Up </legend>
<script>
<!--Function to compare the 2 passwords-->
function compareword(){
ptr1 = document.getElementById("pwd1")
ptr2 = document.getElementById("pwd2")
ptr3 = document.getElementById("error")
if (ptr1.value != ptr2.value){
ptr3.innerHTML = "Passwords do NOT match. Try Again."
ptr2.value = ""
return false
}else{ return true}
}
</script>
<Label class="A">User Name</Label>
<input type=text name="user_name" placeholder="User name" id = "user_name"
autocomplete= "off"
><br><br>
<Label class="A" >Password</Label>
<input type=password name="pwd1" placeholder="This will be your Password" id= "pwd1"
autocomplete= "off"
><br><br>
<Label class="A" >Confirm Password</Label>
<input type=password name="pwd2" placeholder="Confirm Password" id= "pwd2"
onblur="compareword()"
autocomplete= "off"
required
><br>
<span id="error" > </span>
<br>
<input type=submit > <br><br>
</fieldset>
</form>
</html>