Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

relatedTarget event property

relatedTarget event property

Event Object Reference 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:

Runoob Tutorial(runoob.com)

Move the mouse over this paragraph.

Try it »


Event Object Reference Event Object