relatedTarget event property
Event Object
Definition and Usage
The relatedTarget event property returns the node related to the target node of the event.
For the mouseover event, this property is the node that the mouse pointer left when it moved onto the target node.
For the mouseout event, this property is the node that the mouse pointer entered when leaving the target.
For other types of events, this property is not useful.
Syntax
event.relatedTarget
Example
Example
The following example returns the element the pointer just left:
Move the mouse over this paragraph.
Try it »
Event Object