inputType 事件属性
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"
返回事件所涉及的输入类型:
function myFunction(event) {
var x = event.inputType;
}
尝试一下