Sets or retrieves the x-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
Sets or retrieves the y-coordinate of the mouse pointer's position relative to the client area of the window, excluding window decorations and scroll bars.
Sets or retrieves the y-coordinate, in pixels, of the mouse pointer's position relative to a relatively positioned parent element.
Remarks
The event occurs when the user moves the mouse pointer into the object, and it does not repeat unless the user moves the mouse pointer out of the object and then back into it.
Examples
This example uses the onmouseover event to apply a new style to an object.
<DIV>
<P onmouseover="this.style.color='red'"
onmouseout="this.style.color='black'">
Move the mouse pointer over this text, then move it elsewhere in the
document. Move the mouse pointer over this text, then move it
elsewhere in the document.
</DIV>
This example shows how to change the value of a text area in response to mouse events.
<DIV>
<P>Move the mouse pointer into the text area to fire the
onmouseover event. Move it out to clear the text.
<TEXTAREA NAME=txtMouseTrack
onmouseover="this.value='onmouseover fired'"
onmouseout="this.value=''">
</TEXTAREA>
</DIV>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.