HTML onmouseout Event Attribute HTML Reference



Example

Execute a JavaScript when moving the mouse pointer out of an image:

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

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

1. Definition and Usage

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

Note: The onmouseout attribute CANNOT be used with: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.


2. Differences Between HTML 4.01 and HTML5

None.


3. Syntax

<element onmouseout="script">

4. Attribute Values

ValueDescription
scriptThe script to be run on onmouseout

Relative articles

Bootstrap 3 Navbar