-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration.html
77 lines (74 loc) · 2.54 KB
/
registration.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Registration Page</title>
<script>
function validation_check() {
var name = document.forms["RegForm"]["Name"]
var address = document.forms["RegForm"]["Address"]
var email = document.forms["RegForm"]["EMail"]
var course = document.forms["RegForm"]["Course"]
if (name.value == "") {
window.alert("Please enter your name.")
name.focus();
return false;
}
if (address.value == "") {
window.alert("Please enter your address.")
address.focus();
return false;
}
if (email.value == "") {
window.alert("Please enter your email address.")
email.focus();
return false;
}
if (course.selectedIndex < 1) {
window.alert("Please select your course.")
course.focus();
return false;
}
return true
}
</script>
</head>
<body>
<h1 style="text-align: center;">Registration Form</h1>
<form name="RegForm" action="Success.html" onsubmit="return validation_check()" method="post">
<table border=100>
<caption> Registration form </caption>
<tr>
<th>Name</th>
<td><input type="text" size="65" name="Name"></td>
</tr>
<tr>
<th>Address</th>
<td><input type="text" size="65" name="Address"></td>
</tr>
<tr>
<th>Email</th>
<td><input type="text" size="65" name="EMail"></td>
</tr>
<tr>
<th>Select your course</th>
<td>
<select type="text" value="" name="Course">
<option> </option>
<option>M.Tech</option>
<option>B.Tech</option>
<option>MCA</option>
<option>BCA</option>
<option>B.Sc.</option>
</select>
</td>>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Submit" name="Submit">
<input type="reset" value="Reset" name="Reset">
</td>
</tr>
</table>
</form>
</body>
</html>