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