fromElement Attribute | fromElement Property

Internet Development Index

Sets or retrieves the object from which activation or the mouse pointer is exiting during the event.

Syntax

event.fromElement [ = oObject ]

Possible Values

oObject Object that specifies or receives the previous location of activation or the mouse pointer.

The property is read/write. The property has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Remarks

The property is read-only in Microsoft® Internet Explorer 4.0, and read/write in Internet Explorer 5 and later.

Example

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

<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 Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this property.

Applies To

event