Proprietà inputType dell'evento Input

Definizione e uso

inputType L'attributo restituisce il tipo di modifica completata dall'evento.

Valori possibili:

  • "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"

Esempio

Restituisci il tipo di input dell'evento:

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

Prova personalmente

Sintassi

event.inputType

Dettagli tecnici

Valore di ritorno: Valore di stringa che indica il tipo di azione completata.

Supporto del browser

Proprietà Chrome IE Firefox Safari Opera
inputType 60 Non supportato Non supportato Supportato 47

Pagine correlate

Metodo execCommand() del Documento