mousedown
イベントは、ポインティングデバイスのボタン(通常はマウスボタン)が要素上で押下されている時に発火します。
一般情報
- 仕様
- DOM L3
- インターフェイス
MouseEvent
- バブリング
- する
- キャンセル
- 可能
- ターゲット
- Element
- デフォルトの動作
- ドラッグ/ドロップ操作を開始する、テキスト選択を開始する、(サポートされている場合、中ボタンと組み合わせて)スクロール/パンを開始する等。
プロパティ
Property | Type | Description |
---|---|---|
target 読取専用 |
EventTarget |
The event target (the topmost target in the DOM tree). |
type 読取専用 |
DOMString |
The type of event. |
bubbles 読取専用 |
Boolean |
Whether the event normally bubbles or not |
cancelable 読取専用 |
Boolean |
Whether the event is cancellable or not? |
view 読取専用 |
WindowProxy |
document.defaultView (window of the document) |
detail 読取専用 |
long (float ) |
A count of consecutive clicks that happened in a short amount of time, incremented by one. |
currentTarget 読取専用 |
EventTarget | The node that had the event listener attached. |
relatedTarget 読取専用 |
EventTarget | For mouseover , mouseout , mouseenter and mouseleave events: the target of the complementary event (the mouseleave target in the case of a mouseenter event). null otherwise. |
screenX 読取専用 |
long | The X coordinate of the mouse pointer in global (screen) coordinates. |
screenY 読取専用 |
long | The Y coordinate of the mouse pointer in global (screen) coordinates. |
clientX 読取専用 |
long | The X coordinate of the mouse pointer in local (DOM content) coordinates. |
clientY 読取専用 |
long | The Y coordinate of the mouse pointer in local (DOM content) coordinates. |
button 読取専用 |
unsigned short | The button number that was pressed when the mouse event was fired: Left button=0, middle button=1 (if present), right button=2. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. |
buttons 読取専用 |
unsigned short | The buttons being pressed when the mouse event was fired: Left button=1, Right button=2, Middle (wheel) button=4, 4th button (typically, "Browser Back" button)=8, 5th button (typically, "Browser Forward" button)=16. If two or more buttons are pressed, returns the logical sum of the values. E.g., if Left button and Right button are pressed, returns 3 (=1 | 2). More info. |
mozPressure 読取専用 |
float | The amount of pressure applied to a touch or tabdevice when generating the event; this value ranges between 0.0 (minimum pressure) and 1.0 (maximum pressure). |
ctrlKey 読取専用 |
boolean | true if the control key was down when the event was fired. false otherwise. |
shiftKey 読取専用 |
boolean | true if the shift key was down when the event was fired. false otherwise. |
altKey 読取専用 |
boolean | true if the alt key was down when the event was fired. false otherwise. |
metaKey 読取専用 |
boolean | true if the meta key was down when the event was fired. false otherwise. |
ブラウザ間の互換性
現在、互換性データを可読形式の JSON フォーマットに置き換えているところです。
この互換性一覧は古い形式を使っており、これに含まれるデータの置き換えが済んでいません。
手助けしていただける場合は、こちらから!
機能 | Chrome | Firefox (Gecko) | Internet Explorer | Edge | Opera | Safari |
---|---|---|---|---|---|---|
基本サポート | (有) | (有) | (有) | (有) | (有) | (有) |
無効化された form 要素上で | (有)[1] | 未サポート | (有) | 未サポート | (有)[1] | ? |
機能 | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
基本サポート | ? | (有) | ? | ? | ? | ? |
無効化された form 要素上で | ? | 未サポート | ? | ? | ? | ? |
[1] <textarea>
要素といくつかの <input>
要素でのみ動作します。