inputType プロパティ
event.inputType
inputType プロパティは、input、textareaなどの編集できるエレメントや contenteditable プロパティによって編集可能になったエレメントにおいてその編集操作のタイプを返すInputEventインターフェイスのプロパティです。
var string_inputtype = event.inputType;
詳しくは Example を参照してください
ページ内 Index
構文(Syntax)
返り値は String 型です。
String = event.inputType;
返り値(Return Values)
| Type | 摘要 |
|---|---|
| String | 編集操作のタイプ |
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 エレメントになにか入力すると、入力タイプが都度表示されます。
以下の確認
ボタンをクリックすると実行します。
