DOM

Window:input イベント

 編集:2022.10.16 by T.A.

[Edge]。→

Window 内で、編集可能要素、入力要素で入力されたときに発行されます。

バブリング あり
キャンセル可能 いいえ
インターフェイス InputEvent
イベント ハンドラー プロパティ oninput

HTML:

<SPAN id=IdSpan contenteditable>SPAN要素1。ここで編集…</SPAN><BR>
<INPUT id=IdInput type=text value="INPUT要素"><BR>
<SPAN id=IdLog></SPAN>

JavaScript:

function Job(eve){  //input イベントの処理:
  D=eve;  //=[object]:[object InputEvent]。SPAN要素でFEP利用で「あ」と [a] を押した。
詳細 //isTrusted=[boolean]:true //data=[string]:あ //isComposing=[boolean]:false //inputType=[string]:insertText //dataTransfer=[object]:null //getTargetRanges=[function]:function getTargetRanges() { [native code] } //view=[object]:null //detail=[number]:0 //sourceCapabilities=[object]:null //which=[number]:0 //initUIEvent=[function]:function initUIEvent() { [native code] } //type=[string]:input //target=[object]:[object HTMLSpanElement] //currentTarget=[object]:null //eventPhase=[number]:0 //bubbles=[boolean]:true //cancelable=[boolean]:false //defaultPrevented=[boolean]:false //composed=[boolean]:true //…
IdLog.innerHTML=IdLog.innerHTML+"●"; //表示。 } window.oninput=Job; //イベント割り当て。

テスト