Click to return to the DHTML, HTML     
TITLE Attribute | title P...     top Attribute | top Prope...     DHTML Properties    
Web Workshop  |  DHTML, HTML & CSS

toElement Property


Retrieves a reference to the object to which the user is moving the mouse pointer.

Syntax

HTMLN/A
Scripting[ oObject = ] event.toElement

Possible Values

oObjectObject that specifies the object being moved to by the mouse.

The property is read-only with no default value.

Example

This example uses the toElement property to display the tagName of the object to which the user moves the mouse pointer.

Sample Code

<SCRIPT>
function fnGetTo(){
   spanTo.innerHTML=window.event.toElement.tagName;
}

</SCRIPT>
:
<SPAN onmouseout="fnGetTo()">
   <P>Mouse Over This</P>
   <P>toElement: <SPAN ID="spanTo"></SPAN></P>
</SPAN>

This feature requires Internet Explorer 4.0 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:
HTML N/A
Scripting event


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.