forked from Return-Ready-PT-Tues-Thurs/JavaScript-DOM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjs-dom.html
More file actions
26 lines (23 loc) · 696 Bytes
/
js-dom.html
File metadata and controls
26 lines (23 loc) · 696 Bytes
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
<!DOCTYPE html>
<html>
<body>
<img id="myImg" src="kamaji.jpg" alt="Kamaji the boiler man" style='border-radius: 50%'>
<button type="button" onclick="myFunction()">Hide/Show Kamaji</button>
<script>
document.write("<p style='font-size: 40px ; color: purple' ; font-color: purple; text-align: center'>Developers for life!</p>");
</script>
<script>
document.write("<p>We are coders!</p>");
</script>
<script>
function myFunction() {
var x = document.getElementById("myImg");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
</script>
</body>
</html>