English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
activeElementA read-only property that returns the current focus element in the document.
document.activeElement
var x = document.activeElement.tagName;Test and See‹/›
The numbers in the table specify the first browser version that fully supports the activeElement property:
Property | |||||
activeElement | 2 | 3 | 9.6 | 4 | 4 |
Return Value: | Reference to the element object that has the focus in the document |
---|---|
DOM Version: | DOM Level3 |