-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdup.jsp
107 lines (93 loc) · 3.24 KB
/
sdup.jsp
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 300px;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="submit"] {
width: 100%;
padding: 10px;
margin: 5px 0;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 5px;
}
input[type="submit"] {
background-color: #4caf50;
color: white;
border: none;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
.error {
color: red;
font-size: 0.8em;
margin-top: 5px;
}
h2{
text-align: center;
color:purple;
}
</style>
</head>
<body>
<div class="container">
<h2>Create Account</h2>
<form methode="post" action="../iranna/sdup_ins.jsp">
<input type="text" id="name" name="ps" placeholder="Name">
<input type="email" id="email" name="eid" placeholder="Email">
<div id="emailError" class="error"></div>
<input type="tel" id="mobile" name="mob" placeholder="Mobile Number">
<div id="mobileError" class="error"></div>
<input type="submit" name="valid" value="Sin Up">
</form>
</div>
<%-- <script>
function validateForm() {
var name = document.getElementById('name').value;
var email = document.getElementById('email').value;
var mobile = document.getElementById('mobile').value;
var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
var mobileRegex = /^\d{10}$/;
var valid = true;
if (name.trim() === '') {
valid = false;
alert('Please enter your name.');
}
if (!emailRegex.test(email)) {
valid = false;
document.getElementById('emailError').innerText = 'Please enter a valid email address ending with @gmail.com';
} else {
document.getElementById('emailError').innerText = '';
}
if (!mobileRegex.test(mobile)) {
valid = false;
document.getElementById('mobileError').innerText = 'Please enter a valid 10-digit mobile number.';
} else {
document.getElementById('mobileError').innerText = '';
}
return valid;
}
</script> --%>
</body>
</html>