目录

InputEvent inputType Property

Example

Return the type of input the event was about:

function myFunction(event) {
  let text = event.inputType;
}
Try it Yourself »

Description

The inputType property returns the type of change that was done by the event.

The inputType property is read-only.

Possible values:



















































Syntax

event.inputType

Technical Details

Return Value: A String.
The name of the input action

Browser Support

event.inputType is a DOM Level 4 (2015) feature.

It is supported in all modern browsers:

Chrome Edge Firefox Safari Opera
Yes Yes Yes Yes Yes

event.inputType is not supported in Internet Explorer 11 (or earlier).