THE WORLD'S LARGEST WEB DEVELOPER SITE

type Event Property

❮ Event Object

Example

Return the type of event that was triggered:

var x = event.type;

The result of x could be:

mousedown
Try it Yourself »

Definition and Usage

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


Browser Support

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

Property
type Yes 9.0 Yes Yes Yes

Syntax

event.type

Technical Details

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

❮ Event Object