Thuộc tính inputType của sự kiện InputEvent
Định nghĩa và cách sử dụng
inputType
Thuộc tính trả về loại thay đổi được hoàn thành bởi sự kiện.
Giá trị có thể:
- "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"
Mẫu
Trả về loại đầu vào của sự kiện:
function myFunction(event) { var x = event.inputType; }
Cú pháp
event.inputType
Chi tiết kỹ thuật
Giá trị trả về: | Giá trị chuỗi, chỉ ra loại hành động đã hoàn thành. |
---|
Hỗ trợ trình duyệt
Thuộc tính | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
inputType | 60 | Không hỗ trợ | Không hỗ trợ | Hỗ trợ | 47 |