Windows apps
Collapse the table of content
Expand the table of content

toElement property

Sets or retrieves a reference to the object toward which the user is moving the mouse pointer or, for a touch device, a finger. For the standards based property see toElement.

Syntax

JavaScript

p = object.toElement

Property values

Type: Object

the object being moved to by the mouse or finger.

Examples

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


<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>

 

 

Send comments about this topic to Microsoft

Build date: 11/26/2012

Show:
© 2017 Microsoft