📖
training
  • index
  • CSS
  • JavaScript
    • DOM イベント
    • document.write
    • window.alert
    • console.log
    • ステートメント
    • データ型
    • for
    • オブジェクト
    • リテラル
    • 変数
    • 宣言
    • スコープ
    • 型変換
    • 配列
    • Strictモード
    • 演算子
    • if
    • switch
    • 繰り返し
    • for
    • for...in
    • for...of
    • for await...of
    • while
    • do...while
    • 関数
    • Element インターフェイス
    • Documentインターフェイス
GitBook提供
このページ内
  • マウス
  • キーボード
  • HTML frame/object
  • HTML form
  • UI
  • Mutation
  • Progress

役に立ちましたか?

  1. JavaScript

DOM イベント

ウィキペディアのDOM_eventsページのCommon Eventsを参照 ディバイスによるイベントとIEから作られた物は省略

マウス

タイプ

属性

説明

click

onclick

Fires when the pointing device button is clicked over an element. A click is defined as a mousedown and mouseup over the same screen location.

dblclick

ondblclick

Fires when the pointing device button is double-clicked over an element

mousedown

onmousedown

Fires when the pointing device button is pressed over an element

mouseup

onmouseup

Fires when the pointing device button is released over an element

mouseover

onmouseover

Fires when the pointing device is moved onto an element

mousemove

onmousemove

Fires when the pointing device is moved while it is over an element

mouseout

onmouseout

Fires when the pointing device is moved away from an element

dragstart

ondragstart

Fired on an element when a drag is started.

drag

ondrag

This event is fired at the source of the drag, that is, the element where dragstart was fired, during the drag operation.

dragenter

ondragenter

Fired when the mouse is first moved over an element while a drag is occurring.

dragleave

ondragleave

This event is fired when the mouse leaves an element while a drag is occurring.

dragover

ondragover

This event is fired as the mouse is moved over an element when a drag is occurring.

drop

ondrop

The drop event is fired on the element where the drop occurs at the end of the drag operation.

dragend

ondragend

The source of the drag will receive a dragend event when the drag operation is complete, whether it was successful or not.

keydown

onkeydown

Fires before keypress, when a key on the keyboard is pressed.

keypress

onkeypress

Fires after keydown, when a key on the keyboard is pressed.

keyup

onkeyup

Fires when a key on the keyboard is released

キーボード

タイプ

属性

説明

keydown

onkeydown

Fires before keypress, when a key on the keyboard is pressed.

keypress

onkeypress

Fires after keydown, when a key on the keyboard is pressed.

keyup

onkeyup

Fires when a key on the keyboard is released

HTML frame/object

タイプ

属性

説明

load

onload

Fires when the user agent finishes loading all content within a document, including window, frames, objects and images

For elements, it fires when the target element and all of its content has finished loading

unload

onunload

Fires when the user agent removes all content from a window or frame

For elements, it fires when the target element or any of its content has been removed

abort

onabort

Fires when an object/image is stopped from loading before completely loaded

error

onerror

Fires when an object/image/frame cannot be loaded properly

resize

onresize

Fires when a document view is resized

scroll

onscroll

Fires when an element or document view is scrolled

HTML form

タイプ

属性

説明

select

onselect

Fires when a user selects some text in a text field, including input and textarea

change

onchange

Fires when a control loses the input focus and its value has been modified since gaining focus

submit

onsubmit

Fires when a form is submitted

reset

onreset

Fires when a form is reset

focus

onfocus

Fires when an element receives focus either via the pointing device or by tab navigation

blur

onblur

Fires when an element loses focus either via the pointing device or by tabbing navigation

UI

タイプ

属性

説明

focusin

(none)

Similar to HTML focus event, but can be applied to any focusable element

focusout

(none)

Similar to HTML blur event, but can be applied to any focusable element

DOMActivate

(none)

Similar to XUL command event. Fires when an element is activated, for instance, through a mouse click or a keypress.

Mutation

タイプ

属性

説明

DOMSubtreeModified

(none)

Fires when the subtree is modified

DOMNodeInserted

(none)

Fires when a node has been added as a child of another node

DOMNodeRemoved

(none)

Fires when a node has been removed from a DOM-tree

DOMNodeRemovedFromDocument

(none)

Fires when a node is being removed from a document

DOMNodeInsertedIntoDocument

(none)

Fires when a node is being inserted into a document

DOMAttrModified

(none)

Fires when an attribute has been modified

Progress

タイプ

属性

説明

loadstart

(none)

Progress has begun.

progress

(none)

In progress. After loadstart has been dispatched.

error

(none)

Progression failed. After the last progress has been dispatched, or after loadstart has been dispatched if progress has not been dispatched.

abort

(none)

Progression is terminated. After the last progress has been dispatched, or after loadstart has been dispatched if progress has not been dispatched.

load

(none)

Progression is successful. After the last progress has been dispatched, or after loadstart has been dispatched if progress has not been dispatched.

loadend

(none)

Progress has stopped. After one of error, abort, or load has been dispatched.

前へindex次へdocument.write

最終更新 5 年前

役に立ちましたか?