I am currently tackling a test paper for the Microsoft Certification in Programming in HTML5 with JavaScript and CSS3. I have encountered a question for which I cannot find the answer:
The Question:
You have been tasked with creating a JavaScript function that will display the name of a web application. You have declared a button element as follows: When a user clicks the button, a JavaScript function called "About" must be invoked. Your goal is to create an event handler that will call the "About" function when the button is clicked. Which two code segments should you use? (Select two options below)
Options:
A. var button=document.getElementById("About");
ScriptEngine.call(button,About());
B. var button=document.getElementById("About");
ScriptEngine.bind(button,About());
C. var button=document.getElementById("About");
button.addEventListener("click",About);
D. var button=document.getElementById("About");
button.attachEvent("onclick",About);
Which options are correct?