You are troubleshooting a web page that includes the following code. (Line numbers are
included for reference only.)
What is displayed in the alert from line 11?
Option A
Div
Option B
Function
Option C
Button
Option D
Document
Correct Answer
C
Explanation Explanation: * The event handler here normalizes event object (passed as a first argument) and invokes handleCellClick in a proper context (i.e. referring to an element that was attached event listener to). The element is the button elButton. * addEventListener Syntax: element.addEventListener(event, function, useCapture) Reference: HTML DOM addEventListener() Method
Question ID 14812
You are developing an HTML5 web page.
The appearance of the text box must change when a user moves the focus to another
element on the page.
You need to develop the page to respond to user action.
Which line of code should you use?
Explanation Explanation: Definition and Usage The onblur event occurs when an object loses focus. Example Execute a JavaScript when a user leaves an input field: Reference: onblur Event http://www.w3schools.com/jsref/event_onblur.aspx.