This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.



Fires when the user moves the mouse pointer outside the boundaries of the object.

Overview Table

Synchronous No
Bubbles Yes
Target dom/Element
Cancelable No
Default action none
## Examples

This example uses the onmouseout event to apply a new style to an object.

<p onmouseout="'black';"
Move the mouse pointer over this text to change its color.
Move the pointer off the text to change the color back.

This example shows how to swap images on mouse events.

<script type="text/javascript">
function flipImage(url)
    if (window.event.srcElement.tagName == "img" )
        window.event.srcElement.src = url;
<p>Move the mouse over the image to see it switch.</p>
<img src="/workshop/graphics/prop_ro.png"

View live example



When the user moves the mouse over an object, one onmouseover event occurs, followed by one or more onmousemove events as the user moves the mouse pointer within the object. One onmouseout event occurs when the user moves the mouse pointer out of the object. Initiates any action associated with this event. To invoke this event, do one of the following:

  • Move the mouse pointer out of an object.


Standards information

Event handler parameters

pEvtObj [in]
Type: ****IHTMLEventObj****