fromElement Property

DHTML, HTML, & CSS

fromElement Property


Retrieves the object the mouse pointer is exiting during the onmouseover and onmouseout events.

Syntax

HTMLN/A
Scripting[ oObject = ] event.fromElement

Possible Values

oObjectObject that specifies the previous location of the mouse pointer.

The property is read-only with no default value.

Example

In this example, the alert returns "mouse arrived" when the mouse pointer moves over the button.

Sample Code

<SCRIPT>
function testMouse(oObject) {
	if(!oObject.contains(event.fromElement)) {
		alert("mouse arrived");
	}
}
</SCRIPT>
:
<BUTTON ID=oButton onmouseover="testMouse(this)">Mouse Over This.</BUTTON>

This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
HTML N/A
Scripting event

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.