Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

onmouseover event

onmouseover event

Event Object Reference Event Object

Example

Execute JavaScript when the mouse pointer moves over the image:

Smiley

Try it »


Definition and Usage

The onmouseover event occurs when the mouse pointer moves onto the specified element.

Syntax

In HTML:

<

element

onmouseover="

SomeJavaScriptCode

">

In JavaScript:

object

.onmouseover=function(){

SomeJavaScriptCode

};

Parameters Description
SomeJavaScriptCode Required. Specifies the JavaScript to be executed when the event occurs.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the onmouseover event.


HTML tags that support this event:

The onmouseover attribute can be used on all HTML elements, except: , ,
, , ,