Skip to content

Commit 69ea172

Browse files
committed
Student Registration 13th oct 2024 submiision
1 parent d5c6d31 commit 69ea172

5 files changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"liveServer.settings.port": 5501
3+
}

Html/Student Registration/demo.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
let modeBtn=document.querySelector("#mode");
2+
let body=document.querySelector("body");
3+
let curmode="light"//black
4+
5+
modeBtn.addEventListener("click",()=>{
6+
if(curmode==="light"){
7+
curmode="dark";
8+
body.classList.add("dark");
9+
body.classList.remove("light");
10+
}else{
11+
curmode="light";
12+
body.classList.add("light");
13+
body.classList.remove("dark");
14+
}
15+
console.log(curmode);
16+
17+
})
18+
19+

Html/Student Registration/login.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ <h2>Student Login</h2>
3737
<input type="password" id="password" name="password" required><br><br>
3838

3939
<input type="submit" value="Login">
40+
<button id="mode"> Change Mode</button>
4041
</form>
42+
<script src="demo.js"></script>
4143
</body>
4244
</html>

Html/Student Registration/register.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ <h2>Student Registration</h2>
4040
<input type="password" id="password" name="password" required><br><br>
4141

4242
<input type="submit" value="Register">
43+
<button id="mode"> Change Mode</button>
4344
</form>
45+
<script src="demo.js"></script>
4446
</body>
4547
</html>

Html/Student Registration/style.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2+
.dark{
3+
background-color: black;
4+
color: white;
5+
}
6+
7+
8+
.light{
9+
background-color: white;
10+
color: black;
11+
}
12+
13+
114
body {
215
font-family: Arial, sans-serif;
316
background-color: #f0f8ff;
@@ -34,6 +47,16 @@ input[type=submit]:hover {
3447
background-color: black;
3548
}
3649

50+
51+
button {
52+
padding: 8px 15px;
53+
background-color: #007bff;
54+
color: white;
55+
border: none;
56+
border-radius: 4px;
57+
cursor: pointer;
58+
}
59+
3760
ul {
3861
list-style-type: none; /* Remove bullet points */
3962
padding: 0;

0 commit comments

Comments
 (0)