Question: Find and correct the Errors in the Following DOM based Event handling Program 1. 2. 3. 5. function whichElement (e) 6. var targ 7. if

Find and correct the Errors in the Following DOM

Find and correct the Errors in the Following DOM based Event handling Program 1. 2. 3. 5. function whichElement (e) 6. var targ 7. if (!e) 8. var e = window.event; 10. etarget) t taro-e.target: 12. 13. else if (e.srcElement f 15 16 17 18. var tname name = targ.tadiame; alert (You clicked on a + tname element.)

Click somewhere in the document. An alert box will 21. alert the name of the element you clicked on.

23

This is a heading 25

This is a paragraph.

ht

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 Databases Questions!