Skip to content
Related Articles

Related Articles

HTML | DOM target Event Property
  • Last Updated : 27 Aug, 2019

The target event property in HTML DOM is used to return the element that triggered the event.


Return Value: This property returns the reference of the object on which the event originally occurred.

Below example illustrates the target Event Property in HTML DOM:


<!DOCTYPE html>
        HTML DOM target Event Property
        body {
        h1 {
<body onclick="myGeeks(event)">
    <h2>HTML DOM target Event Property</h2>
    <p>Click on the elements to get the triggered element</p>
    <button>Click Here</button>
    <p id = "GFG"></p>
        function myGeeks(event) { 
            var x =;
                = "Triggered element: " + x.tagName;


Supported Browsers: The browsers supported by HTML DOM target Event Property are listed below:

  • Google Chrome
  • Internet Explorer 9.0
  • Firefox
  • Safari
  • Opera

My Personal Notes arrow_drop_up
Recommended Articles
Page :