-
Notifications
You must be signed in to change notification settings - Fork 0
/
sholarshipreg.html
146 lines (129 loc) · 5.23 KB
/
sholarshipreg.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<center>
<form name="Registration" action="user.jsp" onsubmit="return val()">
<h1>Scholarship Portal</h1>
<img src="upload/WhatsApp Image 2024-08-31 at 09.24.32_b6271fe9.jpg" width="200" height="300" alt="WhatsApp Image 2024-08-31 at 09.24.32_b6271fe9"/>
<table border="0">
<tbody>
<tr>
<td>Name: </td>
<td><input type="text" name="name" value="" /></td>
</tr>
<tr>
<td>Class:</td>
<td><select name="class">
<option>10th</option>
<option>12th</option>
<option>Graduation</option>
<option>Master</option>
</select></td>
</tr>
<tr>
<td>Mobile No: </td>
<td><input type="text" name="mobile" value="" /></td>
</tr>
<tr>
<td>Email:</td>
<td><input type="text" name="email" value="" /></td>
</tr>
<tr>
<td>Gender:</td>
<td><input type="radio" name="gender" Id="gender1" value="male" />Male
<input type="radio" name="gender" Id="gender2" value="female" />Female </td>
</tr>
<tr>
<td>DOB:</td>
<td><input type="date" name="date" value="" /></td>
</tr>
<tr>
<td>Roll No:</td>
<td><input type="text" name="roll" value="" /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="text" name="pass" Id="pass" value="" /></td>
</tr>
<tr>
<td>Conform Password:</td>
<td><input type="text" name="cpass" Id="cpass" value="" /></td>
</tr>
<tr>
<td><input type="submit" value="Register" /></td>
<td></td>
</tr>
</tbody>
</table>
</form>
</center>
<script>
function val()
{
var n=document.user.name.value;
if(n===null || n==="")
{
alert("Name is mandatory");
return false;
}
var m = document.user.mobile.value;
if( isNaN(m))
{
alert("Enter only numeric value");
return false;
}
else if(m.length !== 10)
{
alert ("mobile number should be 10 digit long");
return false;
}
var e = document.user.email.value;
var ap = e.indexOf("@");
var dp = e.lastIndexOf(".");
if(ap<1 || dp<=ap+1 || dp===(e.length-1))
{
alert("invalid email Format");
return false;
}
var g1 = document.getElementById("gender1");
var g2 = document.getElementById("gender2");
if(g1.checked===false && g2.checked===false )
{
alert("You didn't select any gender");
return false;
}
var r = document.user.roll.value;
if(r===null || r==="")
{
alert ("Please Enter the Roll No. ");
return false;
}
else if(r.length > 15)
{
alert("Please Enter Proper Roll No. ")
}
var p1 = documnet.Registration.pass.value;
var p2 = documnet.Registration.Cpass.value;
if(p1!== p2){
alert("Password does not match");
return false;
}else
{
return true;
}
}
</script>
</body>
</html>
</body>
</html>