Return the type of input the event was about:
function myFunction(event) {
let text = event.inputType;
}
Try it Yourself »
The inputType
property returns the type of change that was done by the event.
The inputType
property is read-only.
Possible values:
event.inputType
Return Value: | A String. The name of the input action |
---|
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).
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!