File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,24 @@ function init () {
4
4
const paragraph = document . getElementById ( "statusReport" ) ;
5
5
6
6
// Put your code for the exercises here.
7
+ button . addEventListener ( 'click' , event => {
8
+ paragraph . innerHTML = 'Houston! We have liftoff!' ;
9
+ } ) ;
10
+ missionAbort . addEventListener ( "mouseover" , event => {
11
+ missionAbort . style . backgroundColor = "red" ;
12
+ } )
13
+ missionAbort . addEventListener ( "mouseout" , event => {
14
+ missionAbort . style . backgroundColor = "" ;
15
+ } )
16
+ missionAbort . addEventListener ( "click" , function ( ) { window . confirm ( "Are you sure you want to abort the mission?" ) ;
17
+ if ( window . confirm ) {
18
+ paragraph . innerHTML = 'Mission aborted! Space shuttle returning home' ;
19
+ }
7
20
21
+ } ) ;
22
+
23
+
24
+
8
25
}
9
26
10
27
window . addEventListener ( "load" , init ) ;
Original file line number Diff line number Diff line change 1
1
h1 {
2
2
text-decoration : underline;
3
3
}
4
+
5
+ .abortMission {
6
+ background-color : red;
7
+ }
You can’t perform that action at this time.
0 commit comments