What are the ways to assign event handlers in java script (for example, to show a message box while closing the window) ?

  1. window.onunload=function() { alert('closing'); }

  2. window.onunload+=onClose; function onClose() { alert('closing'); }

  3. window.onunload=onClose; function onClose() { alert('closing'); }

  4. All the above


Correct Option: A,C

Find more quizzes: