-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhighlightedMenu.html
More file actions
73 lines (55 loc) · 2.06 KB
/
Copy pathhighlightedMenu.html
File metadata and controls
73 lines (55 loc) · 2.06 KB
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
<html>
<head>
<title>Highlighted Menu</title>
<style>
/* Styling the menu */
ul li {
padding: 10px;
text-align: center;
background-color: #333;
color: white;
cursor: pointer;
}
</style>
</head>
<body >
<center>
<ul>
<li onmouseover="highlight1()" onmouseout="highlight5()" id ="mybo1">Home</li>
<li onmouseover="highlight2()" onmouseout="highlight6()" id ="mybo2">About</li>
<li onmouseover="highlight3()" onmouseout="highlight7()" id ="mybo3">Services</li>
<li onmouseover="highlight4()" onmouseout="highlight8()" id ="mybo4">Contact</li>
</ul>
</center>
<script>
function highlight1() {
document.getElementById("mybo1").style=" background-color: #ffeb3b;color: black;";
}
function highlight2() {
document.getElementById("mybo2").style=" background-color: #ffeb3b;color: black;";
}
function highlight3() {
document.getElementById("mybo3").style=" background-color: #ffeb3b;color: black;";
}
function highlight4() {
document.getElementById("mybo4").style=" background-color: #ffeb3b;color: black;";
}
function highlight5()
{
document.getElementById("mybo1").style=" background-color: #333; color: black;";
}
function highlight6()
{
document.getElementById("mybo2").style=" background-color: #333; color: black;";
}
function highlight7()
{
document.getElementById("mybo3").style=" background-color: #333; color: black;";
}
function highlight8()
{
document.getElementById("mybo4").style=" background-color: #333; color: black;";
}
</script>
</body>
</html>