asp.net.ph

Skip Navigation Links

toElement Property

event Properties   DHTML Events


Internet Explorer® 5 and up only.

Retrieves the object the cursor is moving into on an onmouseover or onmouseout event.

Syntax


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

Possible Values


oObject Object being moved to.

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 gone" when the user moves the mouse away from the button.

<script language="JavaScript">
function testMouse ( oObject ) {
if ( !oObject.contains ( event.toElement ) ) {
  alert ( "mouse gone" );
  }
}
</script>
...
<button id=oButton 
  onmouseout="testMouse ( this )">
  Mouse Over This.</button>

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

 Show me 

Applies To

event

See Also

fromElement



>

© 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