目录

HTML DOM InputEvent

❮ DOM 事件 ❮ 事件对象


输入事件对象

InputEvent 对象处理输入元素更改时发生的事件。

输入事件

Event Occurs When
oninput The content (value) of an input element is changed

输入事件属性

Property Returns
data The inserted characters
dataTransfer An object containing information about the inserted/deleted data
inputType The type of the change (i.e "inserting" or "deleting")
isComposing If the state of the event is composing or not

输入事件方法

Method Returns
getTargetRanges() An array containing target ranges that will be affected by the insertion/deletion

继承的属性和方法

InputEvent 继承了以下所有属性和方法:

Ui事件

事件对象


❮ DOM 事件 ❮ 事件对象