-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
123 lines (89 loc) · 3.98 KB
/
index.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Form</title>
<link rel="stylesheet" href="./signup.css">
</head>
<body>
<div class="log">
<h1>SIGN-UP PAGE</h1>
<img src="WhatsApp Image 2021-11-23 at 1.15.04 PM (1).jpeg" alt="signup" class="img">
<form action="" onsubmit="return signupw()">
<label> FITST NAME</label>
<input type="text" name="text" placeholder="enter your first name" class="forinput" id="input1" autocomplete=off>
<span id="span1" class="forspan"></span>
<br>
<label> LAST NAME</label>
<input type="text" name="text" placeholder="enter your last name" class="forinput" id="input2" autocomplete=off>
<span id="span2" class="forspan"></span>
<br>
<label>EMAIL-ID</label>
<input type="email" name="email" placeholder="enter your email" class="forinput" id="input3" autocomplete=off>
<span id="span3" class="forspan"></span>
<br>
<label>PASSWORD</label>
<input type="password" name="password" placeholder="enter your password" class="forinput" id="input4" autocomplete=off >
<span id="span4" class="forspan"></span>
<br><br>
<input type="submit" value="SIGNUP" name="signup" class="signup">
<!-- <button> <a href="/loveweb/feedback.html" target="_blank">SUBMIT</a></button>
-->
<!-- <button onclick="">SUBMIT</button> -->
</form>
<!-- <a href="feedback.html" ></a> -->
<!-- <button type="submit" >SUBMIT</button> -->
</div>
<script>
function signupw() {
// console.log(document.getElementById('input4'));
let firstname = document.getElementById('input1').value;
let lastname = document.getElementById("input2").value;
let email = document.getElementById("input3").value;
let password = document.getElementById("input4").value;
//Validation for firstname
if (firstname == "") {
document.getElementById("span1").innerHTML = "**Please enter ur first name***";
return false;
}
if(!isNaN(firstname)){
document.getElementById("span1").innerHTML = "**Please enter character***";
return false;
}
//Validation for lastname
if(lastname ==""){
document.getElementById("span2").innerHTML="**Please enter ur last name***";
return false;
}
if(!isNaN(lastname)){
document.getElementById("span2").innerHTML = "**Please enter character***";
return false;
}
//Validation for email
if(email==""){
document.getElementById("span3").innerHTML="**Please enter ur email***";
return false;
}
// if(email.indexOf("@")<=0){
// document.getElementById("span3").innerHTML="**Please enter character before email***";
// return false;
// }
if((email.charAt(email.length-4)!=".") && (email.charAt(email.length-3)!=".")){
document.getElementById("span3").innerHTML="**Please enter email followed by '.' like '.com' or '.in' ***";
return false;
}
// Validation for password
if(password==""){
document.getElementById("span4").innerHTML="**Please enter ur password***";
return false;
}
if(password.length<=8){
document.getElementById("span4").innerHTML="**Password must be at least 8 characters***";
return false;
}
}
</script>
</body>
</html>