You are creating a JavaScript function that displays the name of a web application.
You declare the following button element.
When a user clicks the button, a JavaScript function named Contact must be called.
You need to create an event handler that calls the Contact function when the button is clicked.
Which two code segments can you use? (Each correct answer presents a complete solution. Choose two.)
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Explanation:
https://www.w3schools.com/jsref/met_element_addeventlistener.asp
The right answer is C,D, D is when you use an old version of IExplorer, the most commune is C for the new versions of browsers.
C and D