type Event Property

Example

Return the type of event that was triggered:

var x = event.type;
Try it Yourself »

Description

The type event property returns the type of the triggered event.


Syntax

event.type

Technical Details

Return Value: A String, representing the type of the event
DOM Version: DOM Level 2 Events

Browser Support

event.type is a DOM Level 2 (2001) feature.

It is fully supported in all browsers:

Chrome Edge Firefox Safari Opera IE
Yes Yes Yes Yes Yes 9-11


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.