asp.net.ph

Skip Navigation Links

fromElement Property

event Properties   DHTML Events


Retrieves the object the cursor is exiting on an onmouseover and onmouseout event.

Syntax


HTML N/A
Script [ oObject = ] event.fromElement

Possible Values


oObject Element being moved.

The property is read-only with no default value.

Remarks

This property is Microsoft's implementation of the generic relatedNode interface specified in the DOM.

In the same manner, the relatedNode property is used to identify a secondary node related to a User Interface ( UI ) event. The DOM specifies to use relatedNode with the mouseover event to indicate the node which the pointing device exited, and with the mouseout event to indicate the node which the pointing device entered.

Example

In the following example, the alert returns "mouse arrived" when the cursor is moved over the button.

<script language="JavaScript">
function testMouse ( oObject ) {
if ( !oObject.contains ( event.fromElement ) ) {
  alert ( "mouse arrived" );
  }
}
</script>
...
<button onmouseover="testMouse ( this )">
  Mouse Over This.</button>

This feature requires Microsoft® Internet Explorer® 5 or later.

 Show me 

Applies To

event

See Also

toElement



>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note