Skip to content

Commit 29099a0

Browse files
committed
added dom-and-events directory with exercises
1 parent 36be95c commit 29099a0

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

dom-and-events/exercises/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Flight Simulator</title>
5+
<link rel="stylesheet" type="text/css" href="style.css"/>
6+
<script src = "script.js"></script>
7+
</head>
8+
<body>
9+
<h1>Flight Simulator</h1>
10+
<p id="statusReport">The shuttle is on the ground</p>
11+
<button id = "liftoffButton">Take off</button>
12+
<button id = "abortMission">Abort mission</button>
13+
</body>
14+
</html>

dom-and-events/exercises/script.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function init () {
2+
const missionAbort = document.getElementById("abortMission");
3+
const button = document.getElementById("liftoffButton");
4+
const paragraph = document.getElementById("statusReport");
5+
6+
// Put your code for the exercises here.
7+
8+
}
9+
10+
window.addEventListener("load", init);

dom-and-events/exercises/style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
h1 {
2+
text-decoration: underline;
3+
}

0 commit comments

Comments
 (0)