InputEvent inputType 属性
描述
The inputType
属性返回事件执行的更改类型。
The inputType
属性是只读的。
可能的值
"insertText""insertReplacementText"
"insertLineBreak"
"insertParagraph"
"insertOrderedList"
"insertUnorderedList"
"insertHorizontalRule"
"insertFromYank"
"insertFromDrop"
"insertFromPaste"
"insertTranspose"
"insertCompositionText"
"insertFromComposition"
"insertLink"
"deleteByComposition"
"deleteCompositionText"
"deleteWordBackward"
"deleteWordForward"
"deleteSoftLineBackward"
"deleteSoftLineForward"
"deleteEntireSoftLine"
"deleteHardLineBackward"
"deleteHardLineForward"
"deleteByDrag"
"deleteByCut"
"deleteByContent"
"deleteContentBackward"
"deleteContentForward"
"historyUndo"
"historyRedo"
"formatBold"
"formatItalic"
"formatUnderline"
"formatStrikethrough"
"formatSuperscript"
"formatSubscript"
"formatJustifyFull"
"formatJustifyCenter"
"formatJustifyRight"
"formatJustifyLeft"
"formatIndent"
"formatOutdent"
"formatRemove"
"formatSetBlockTextDirection"
"formatSetInlineTextDirection"
"formatBackColor"
"formatFontColor"
"formatFontName"
语法
event.inputType
技术细节
返回值 | 字符串。 输入操作的名称 |
---|
浏览器支持
event.inputType
是 DOM Level 4 (2015) 的功能。
它在所有现代浏览器中都受支持
Chrome | Edge | Firefox | Safari | Opera |
是 | 是 | 是 | 是 | 是 |
event.inputType
在 Internet Explorer 11(或更早版本)中不受支持。