Open In App
Related Articles

HTML DOM type Event Property

Improve Article
Save Article
Like Article

The type event property in HTML DOM is used to return the type of the triggered event. It returns a string that represents the type of the event. The events can be keyboard events or mouse events. 



Return Value: It returns a string that represents the type of event. 

Example: In this example, we will use DOM type Event Property


<!DOCTYPE html>
        HTML DOM type Event Property
<body onmousedown="event_name(event)"
    <h2>DOM type Event Property</h2>
        press any key or click the mouse
        to get event name.
    <p>Triggered Event: <span id="GFG"></span></p>
    <!-- script to display event name -->
        function event_name(event) {
            let e = event.type;
            document.getElementById("GFG").innerHTML = e;



Supported Browsers: The browsers supported by DOM type event property are listed below:

  • Opera
  • Internet Explorer 9.0
  • Google Chrome
  • Firefox
  • Apple Safari
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 15 Jun, 2023
Like Article
Save Article
Similar Reads
Related Tutorials