-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·43 lines (38 loc) · 1.13 KB
/
index.html
File metadata and controls
executable file
·43 lines (38 loc) · 1.13 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Button demo</title>
<style>
button {
border: 2px solid yellow;
color: white;
background-color: black;
font-size: 30px;
}
button:hover {
border: 2px solid yellow;
color: yellow;
background-color: black;
font-size: 30px;
}
#form1 {
visibility: hidden;
}
#form2 {
visibility: hidden;
}
</style>
</head>
<body>
<button onclick="onClick(this)" id="button1">Button 1</button>
<button onclick="onClick(this)" id="button2">Button 2</button>
<form action="" id="form1"><
</body>
<script>
function onClick(x) {
if (x.id === 'button1') document.getElementById("form1").style.visibility = "visible";
if (x.id === 'button2') document.getElementById("form2").style.visibility = "visible";
}
</script>
</html>