1.

What are the parameters of the attachEvent function?(a) Function(b) Function, Event(c) Event, Function(d) EventThe question was asked in semester exam.The origin of the question is Lazy Loading topic in chapter Invocation and Performance Navigation of JavaScript

Answer»

Correct option is (c) Event, Function

To EXPLAIN: The ADDEVENTLISTENER() method attaches an event handler to an element without OVERWRITING existing event handlers. The attachEvent function accepts two PARAMETERS: the event to attach to, and the function to INVOKE when the event occurs.



Discussion

No Comment Found

Related InterviewSolutions