relatedTarget event properties
Definition and Usage
relatedTarget event property returns the target node node-related events.
For mouseover events, it is this property that node when the mouse pointer over the target node to leave.
For mouseout events, it is the property away from the target, the mouse pointer enters the node.
For other types of events, this property is not available.
grammar
event.relatedTarget
Examples
Examples
The following example returns the element pointer just left:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function getRelatedElement (event) {
alert ( "the mouse pointer over the" + event.relatedTarget.tagName + "element");
}
</ Script>
</ Head>
<Body>
<P onmouseover = "getRelatedElement (event)"> Move your mouse over this period. </ P>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function getRelatedElement (event) {
alert ( "the mouse pointer over the" + event.relatedTarget.tagName + "element");
}
</ Script>
</ Head>
<Body>
<P onmouseover = "getRelatedElement (event)"> Move your mouse over this period. </ P>
</ Body>
</ Html>
try it"
Event objects