InputEvent 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

รายละเอียดเทคนิค

ค่าที่กลับมา: ข้อความเป็นตัวอักษร ที่ชี้แจงประเภทการกระทำที่เสร็จสมบูรณ์

การสนับสนุนโดยเบราเซอร์

แอตทริบิวต์ Chrome IE Firefox Safari Opera
inputType 60 ไม่สนับสนุน ไม่สนับสนุน สนับสนุน 47

หน้าที่เกี่ยวข้อง

วิธี execCommand() ของ Document