The DOM FocusEvent relatedTarget Property is used to returns a name of the Element that is related to that element that triggered the focus/blur event. It is read only Property.
- For onfocus and onfocusin events, the related element is the element that LOST focus.
- For onblur and onfocusout events, the related element is the element that GOT focus.
Return Value: It returns a reference to the related element or elose it returns a null if there is no related elements.
Before focusing an element:
After focusing an element:
Supported Browsers: The browsers supported by DOM FocusEvent relatedTarget Property are listed below:
- Google Chrome
- Internet Explorer 9.0
- Firefox 24.0
- Apple Safari
- HTML | DOM MouseEvent relatedTarget Property
- HTML | DOM FocusEvent
- HTML | DOM id Property
- HTML | DOM specified Property
- HTML | DOM dir Property
- HTML | DOM name Property
- HTML | DOM li value Property
- HTML | DOM value Property
- HTML | DOM Map name Property
- HTML | DOM Bdo dir Property
- HTML | DOM URL Property
- HTML | DOM lastChild Property
- HTML | DOM nodeValue Property
- HTML | DOM inputEncoding Property
- HTML | DOM firstElementChild Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.