خصوصية 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"

Example

return the input type of the event:

function myFunction(even t) {
  var x = even t.inputType;
}

جرب بنفسك

الجملة

حدث.inputType

تفاصيل التقنية

القيمة المعدة: قيمة نصية، تشير إلى نوع العملية التي تم إكمالها.

دعم المتصفح

صفات Chrome IE Firefox Safari Opera
inputType 60 لا يدعم لا يدعم دعم 47

الصفحات ذات الصلة

مетод execCommand() لـ Document