fromElement property
Gets the object that the mouse pointer exited.
![]() |
Syntax
| JavaScript | |
|---|
Property values
Type: Object
The previous object.
Standards information
There are no standards that apply here.
Remarks
You can use the fromElement property for onmouseenter, onmouseleave, onmouseover, and onmouseout events. For example, during an onmouseover event, the fromElement property gets the element that the mouse pointer has exited, and the toElement property gets the element that the mouse pointer has entered.
You can also use the relatedTarget event property to indicate the previous object in mouse transition events. In general, the target attribute always refers to the object that raised an event.
See also
Show:
