Skip to content

Commit 18cac00

Browse files
committed
fixed
1 parent dff330b commit 18cac00

File tree

1 file changed

+22
-0
lines changed
  • 2-ui/2-events/01-introduction-browser-events/01-hide-other/solution.view

1 file changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE HTML>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf-8">
6+
</head>
7+
8+
<body>
9+
10+
<input type="button" id="hider" value="Click to hide the text" />
11+
12+
<div id="text">Text</div>
13+
14+
<script>
15+
// Here it doesn't matter how we hide the text,
16+
// could also use style.display:
17+
document.getElementById('hider').onclick = function() {
18+
document.getElementById('text').hidden = true;
19+
}
20+
</script>
21+
</body>
22+
</html>

0 commit comments

Comments
 (0)