Type event attribute

Definition and usage

Type event attribute returns the type of the triggered event.

Instance

Return triggeredEvent type:

var x = event.type;

Try it yourself

Syntax

event.type

Technical details

Return value: A string value representing the type of the event.
DOM version: DOM Level 2 Events

Browser support

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

Properties Chrome IE Firefox Safari Opera
type Support 9.0 Support Support Support