YouTip LogoYouTip

Event Onmouseover

onmouseover Event

onmouseover Event

--

JavaScript Reference Manual

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

HTML DOM Attribute Object

HTML DOM Console Object

onmouseover Event

Event Object Reference Manual Event Object

Example

Execute JavaScript code when the mouse pointer moves over an image:

<img onmouseover="bigImg(this)" src="smiley.gif" alt="Smiley">

Try it Yourself Β»


Definition and Usage

The onmouseover event occurs when the mouse pointer is moved onto an element, or onto one of its children.

Syntax

In HTML:

<element onmouseover="SomeJavaScriptCode">

In JavaScript:

object.onmouseover=function(){SomeJavaScriptCode};
Parameter Description
SomeJavaScriptCode Required. Specifies the JavaScript to be executed when the event occurs.

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The onmouseover event is supported in all major browsers.


HTML Tags that Support the Event

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


Event Object Reference Manual Event Object

HTML DOM Attribute Object

HTML DOM Console Object

iFlytek Starlight Coding Plan includes free model call quotas for DeepSeek, GLM, Kimi, MiniMax, a one-stop experience and deployment platform. Configuration Guide Β₯3.9/month Activate Now

Click Me to Share Notes

Cancel

Write notes...

Image URL

← Met Table CreatetheadProp Nav Appname β†’