-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcourse.html
123 lines (105 loc) · 5.46 KB
/
course.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 name="viewport" content="width=device-width, initial-scale=1.0">
<title>Course Reg</title>
<link rel="stylesheet" href="styles2.css">
<link rel="stylesheet" href="profile.css">
</head>
<body>
<header>
<h4> VJTI Registration Portal </h4>
</header>
<div id="big">
<div class="small">
<img src="image.png" height="150px">
<h4> Registration number: <br> 240001</h4>
<h3>
Select Your Courses <br>
</h3>
<form action="#" method="post" id="form">
<label for="sub1"></label>
<select id="sub1" name="sub1" placeholder="Select 1st Subject">
<option value="math">Applied Mathematics</option>
<option value="phy">Engineering Physics</option>
<option value="em">Engineering Mechanics</option>
<option value="cpp">Computer Programming</option>
<option value="chem">Applied Chemistry</option>
<option value="bee">Basic Electrical Engineering</option>
<!-- Add more options as needed -->
</select><br>
<label for="sub2"></label>
<select id="sub2" name="sub1" placeholder="Select 2nd Subject">
<option value="math">Applied Mathematics</option>
<option value="phy">Engineering Physics</option>
<option value="em">Engineering Mechanics</option>
<option value="cpp">Computer Programming</option>
<option value="chem">Applied Chemistry</option>
<option value="bee">Basic Electrical Engineering</option>
<!-- Add more options as needed -->
</select><br>
<label for="sub3"></label>
<select id="sub3" name="sub1" placeholder="Select 3rd Subject">
<option value="math">Applied Mathematics</option>
<option value="phy">Engineering Physics</option>
<option value="em">Engineering Mechanics</option>
<option value="cpp">Computer Programming</option>
<option value="chem">Applied Chemistry</option>
<option value="bee">Basic Electrical Engineering</option>
<!-- Add more options as needed -->
</select><br>
<label for="sub4"></label>
<select id="sub4" name="sub4" >
<option value="math" placeholder="Select 4th Subject">Applied Mathematics</option>
<option value="phy">Engineering Physics</option>
<option value="em">Engineering Mechanics</option>
<option value="cpp">Computer Programming</option>
<option value="chem">Applied Chemistry</option>
<option value="bee">Basic Electrical Engineering</option>
<!-- Add more options as needed -->
</select><br>
<button type="submit" class="btn">Submit</button>
</form>
<script> document.getElementById("contactForm").addEventListener("submit", function (event) {
var name = document.getElementById("name").value;
var email = document.getElementById("email").value;
var date = document.getElementById("dob").value;
var branch = document.getElementById("branch").value;
var number = document.getElementById("number").value;
if (!name || !email || !dob ||!branch || !number) {
alert("Please fill in all fields.");
event.preventDefault();
} else
{
alert("Form submitted successfully!\nName: " + name + "\nEmail: " + email + "\ndob: " + dob + "\nbranch" + "\nnumber");
}
});
function validateEmail(email) {
// Regular expression for basic email validation
var re = /\S+@\S+\.\S+/;
return re.test(email);
}
function validatePhoneNumber(phoneNumber)
{
// Regular expression to match exactly 10 digits
var regex = /^\d{10}$/;
// Test the input against the regular expression
if (regex.test(phoneNumber)) {
return true; // Phone number is valid
} else {
return false; // Phone number is not valid
}
}
function clearForm() {
document.getElementById("name").value = "";
document.getElementById("email").value = "";
document.getElementById("dob").value = "";
document.getElementById("branch").value = "";
document.getElementById("number").value = "";
}
</script>
</div>
</div>
</body>
</html>