Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

type event property

type event property

Event Object Reference Event Object


Definition and Usage

The type event property returns the type of event that occurred, that is, the name of the event represented by the current Event object.

It has the same name as the registered event handler, or is the event handler property with the "on" prefix removed, such as "submit", "load", or "click".

Syntax

event.type


Example

Example

The following example returns the type of event that was triggered:

Runoob Tutorial(runoob.com)

Click somewhere in the document. A message box will indicate the type of event you triggered.

Try it »


Event Object Reference Event Object