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