Latest web development tutorials

onmouseout event

Event Object Reference Event objects

Examples

Javascript code is executed when the mouse pointer moves out of the specified object:

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

try it"

Definition and Usage

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

grammar

In HTML:

<element onmouseout="SomeJavaScriptCode">

In JavaScript:

object .onmouseout=function(){SomeJavaScriptCode};

参数 描述
SomeJavaScriptCode 必需。规定该事件发生时执行的 JavaScript。


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support onmouseout event


HTML tags support of the event:

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


Event Object Reference Event objects