Question: Question 5 (12 points) This question is based on the following HTML document. 1 2 3 4 5 6 7 8 9 10 11

Question 5 (12 points) This question is based on the following HTMLdocument. 1 2 3 4 5 6 7 8 9 10 1112 13 14 15 16 17 18 19 20 21 22 23

Question 5 (12 points) This question is based on the following HTML document. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 Test AddEventListener function f(evt) { alert( "f(" + evt.currentTarget.id + } function g(evt) { alert( "g(" + evt.currentTarget.id + } function h(evt) { alert( "h(" + evt.currentTarget.id + evt.stopPropagation(); } var elem - document.getElementById("L11"); 3 elem.addEventListener("click", f, true); elem.addEventListener("click", g, false); 3 var elem - document.getElementById("L31"); elem.addEventListener("click", g, false); elem.addEventListener("click", h, true); var elem = document.getElementById("L22"); var elem = document.getElementById("L32"); elem.addEventListener("click", g, false); var elem = document.getElementById("L23"); elem.addEventListener("click", h, false); elem.addEventListener("click", f, true); var elem document.getElementById("L33" ); elem.addEventListener("click", g, false); 46 47 48 Test AddEv X CO First Second Third + evt.target.id + ")"); + evt.target.id + ")" ); + evt.target.id + ")" ); + T ... D III a) (4) What will be displayed when the button "First" is clicked? Briefly explain. b) (4) What will be displayed when the button "Second" is clicked? Briefly explain. c) (4) What will be displayed when the button "Third" is clicked? Briefly explain. a) Three alert messages, in the following order: f(L11, L31) - During capturing phase g(L31, L31) - Reach the target g(L11, L31) - During bubbling phase b) Two alert messages, in the following order: f(L11, L32) - During capturing phase h(L22, L32) - During capturing phase; stop the propagation. c) Four alert messages, in the following order: f(L11, L33) - During capturing phase f(L23, L33) - During capturing phase g(L33, L33) - Reach the target h(L23, L33) - During bubbling phase; stop the propagation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!