HTML | currentTarget Event Property
The currentTarget event property is used for returning the element whose event listeners are responsible for triggering the event. The currentTarget event property is generally used during capturing and bubbling.
Below program illustrates the currentTarget event property :
Example: Getting the element whose event listeners triggered a specific event.
Before clicking the button:
After clicking the button:
- Internet Explorer
- Google Chrome
- Apple Safari
Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML course.