File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,24 @@ function init () {
33 const button = document . getElementById ( "liftoffButton" ) ;
44 const paragraph = document . getElementById ( "statusReport" ) ;
55
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+ } ) ;
724
825}
926
You can’t perform that action at this time.
0 commit comments