onmouseoutEvents

事件对象参考手册Event Object

Example

Execute JavaScript code when the mouse pointer moves out of the specified object:

<img onmouseout="normalImg(this)" src="smiley.gif.html" alt="Smiley">

Try it Yourself »

Definition and Usage

The onmouseout event occurs when the mouse pointer moves out of the specified object.

Syntax

In HTML:

<element onmouseout="SomeJavaScriptCode">

In JavaScript:

object.onmouseout=function(){SomeJavaScriptCode};

Parameter Description
SomeJavaScriptCode Required. Specifies the JavaScript to execute when the event occurs.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the onmouseout event.


HTML tags that support this event:

The onmouseout attribute can be used on all HTML elements except: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>.


事件对象参考手册Event Object Other Extensions