X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

currentTarget Event Property

Event Object Reference Event Object

Example

Get the element whose event listeners triggered a specific event:

alert(event.currentTarget);

Try it yourself »


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 currentTarget property always refers to the element whose event listener triggered the event, opposed to the target property, which returns the element that triggered the event.


Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property
currentTarget Yes 9.0 Yes Yes Yes


Syntax

event.currentTarget

Technical Details

Return Value: A reference to the object whose event listeners triggered the event
DOM Version: DOM Level 2 Events


Event Object Reference Event Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook