currentTarget Event Property
Definition and Usage
The currentTarget event property returns the element whose event listeners
triggered the event.
This is particularly useful during capturing and bubbling.
The following example gets the element whose event listeners triggered the event:
Try it yourself »
alert("The id of the triggered element: " + x.id);
<p id="p1" onclick="myFunction(event)">
Click on this paragraph. An alert box will
show which element triggered the event.</p>
Thank You For Helping Us!
Your message has been sent to W3Schools.