toElement Property

MS Office 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:
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.