-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPage.htm
76 lines (71 loc) · 1.5 KB
/
Page.htm
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
<!DOCTYPE html>
<html>
<head>
<title>Page.htm</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
* { box-sizing: border-box; }
#MainMenu
{
border: 1px solid red;
cursor: pointer;
display: block;
font-weight: bold;
list-style-position: inside;
list-style-type: none;
margin: 0px;
padding: 0px;
text-align: center;
}
#MainMenu li
{
margin: 0px;
padding: 5px;
}
#SubMenu
{
margin: 0px;
padding: 0px;
}
#SubMenu li
{
border: 1px solid blue;
cursor: pointer;
display: block;
list-style-position: inside;
list-style-type: none;
margin: 0px;
padding: 5px;
text-align: center;
}
</style>
<script type="text/javascript">
function OpenMenu ()
{
var menu = document.getElementById("SubMenu");
var menu_item = document.getElementById("OpenMenuCollapse");
if (menu.style.display == "none")
{
menu.style.display = "initial";
menu_item.textContent = "▲ Menu ▲";
}
else if (menu.style.display == "initial")
{
menu.style.display = "none";
menu_item.textContent = "▼ Menu ▼";
}
}
</script>
</head>
<body>
<ul id="MainMenu">
<!-- ▼ (▼) ▲ (▲) -->
<li id="OpenMenuCollapse" onclick="OpenMenu();">▼ Menu ▼</li>
<ul id="SubMenu" style="display: none;">
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul>
</ul>
</body>
</html>