備忘録的プログラミングリファレンス

inputType プロパティ

event.inputType

 inputType プロパティは、inputtextareaなどの編集できるエレメントや contenteditable プロパティによって編集可能になったエレメントにおいてその編集操作のタイプを返すInputEventインターフェイスのプロパティです。

inputType プロパティ
var string_inputtype = event.inputType;

詳しくは Example を参照してください

ページ内 Index

構文(Syntax)

返り値は String 型です。

String = event.inputType;

返り値(Return Values)

Type摘要
String編集操作のタイプ

 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

 inputType プロパティの例です。input エレメントになにか入力すると、入力タイプが都度表示されます。

 以下の確認ボタンをクリックすると実行します。

確認ボタンをクリックしてください。以下のHTML,CSS,Script例が実行されます。