HTML onmouseoutEvent Attribute

HTML 事件属性HTML Event Attributes

Example

Run script when the mouse pointer moves out of the image:

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

Try it yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the onmouseout event attribute.


Definition and Usage

The onmouseout attribute triggers when the mouse pointer moves out of the element.

Note:The onmouseout attribute cannot be used on the following elements: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.


Differences between HTML 4.01 and HTML5

None.


Syntax

<element onmouseout="script">

Attribute Value

Value Description
script Specifies the script to be executed when the onmouseout event fires.


HTML 事件属性HTML Event Attributes Other Extensions