mouseout
mouseoutイベントはマウスカーソルが要素から離れた際に発火するイベントです。
次のスクリプトではid属性「bar」の要素からマウスカーソルが離れた際に、function(){…}内の処理が実行されます。
document.getElementById("bar").addEventListener("mouseout", function() {
alert("ok");
}, false);
mouseoutイベントはマウスカーソルのポイント1点のみが制御可能ですが、IE10からは複数の指による操作などが想定された、複数のポイントが制御できるpointeroutイベントが利用できます。
また、マウスカーソルが要素から離れた際ではなく要素に乗った際に発生するイベントにはmouseoverイベントがあります。
登録日 : 2013年06月09日 最終更新日 : 2013年6月9日
同じカテゴリー(Event)のエントリー
- beforeunload
- unload
- pointercancel
- pointerhover
- mouseout
- pointerout
- mouseover
- pointerover
- pointerup
- pointermove
- pointerdown
- gestureend
- gesturechange
- gesturestart
- touchcancel
- devicemotion
- popState
- hashchange
- pagehide
- pageshow
- error
- orientationchange
- touchmove
- touchend
- touchstart
- MutationObserver
- DOMNodeInserted