画像の外にマウスポインタを移動するときに JavaScript を実行します:
<img onmouseout="normalImg(this)" src="smiley.gif" alt="Smiley">
Try it Yourself ❯
onmouseout 属性は、要素の外にマウスポインタを移動するときに発火します。
チップ: onmouseout 属性は、多くの場合、onmouseover 属性と一緒に使用されます。
イベント属性 | |||||
---|---|---|---|---|---|
onmouseout | Yes | Yes | Yes | Yes | Yes |
なし。
<element onmouseout="script">
値 | 説明 |
---|---|
script | script は onmouseout で実行される |
サポートする HTML タグ: | 次の要素を除くすべての HTML 要素: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title> |
---|
HTML DOM リファレンス:onmouseout イベント