![]() |
VOOZH | about |
The DOM activeElement property is used to return the currently active elements in the HTML document. This property is read-only. It gives the reference of a focused element object in the document.
Syntax:
document.activeElementReturn Value: A reference to the element object in the document that has a focus.
Example: In this example, we will use DOM activeElement property.
Output:
👁 ImageSupported Browsers: The browser supported by DOM activeElement property are listed below: