HTML DOM activeElement Property
Get the currently focused element in the document:
The result of x could be:
Definition and Usage
The activeElement property returns the currently focused element in the document.
Note: This property is read-only.
Tip: To give focus to an element, use the element.focus() method.
Tip: To find out if the document has focus, use the document.hasFocus() method.
The numbers in the table specify the first browser version that fully supports the property.
Note: For iOS, elements that are not <input type="text">, will not get focus assigned to them. The property will then return BODY or null.
|Return Value:||A reference to the element object in the document that has focus|