Javascript Reference
Categories: document

javascript document activeElement

@March 15, 2008, 1:22 a.m.
activeElement Firefox/Netscape/NN n/a IE 4 Chrome/Safari/DOM n/a

Read-only

Refers to the object that is currently designated as the active element in the document. To learn more about the returned object, you'll need to examine the object's tagName, id, or other properties. Because buttons and other elements do not receive focus on the IE 4 for Macintosh, the returned value of this property may vary with operating system. While an element (especially a form control) that receives focus also becomes active, an element might be active, but due to other settings in newer IE versions, does not have focus. See the shared setActive( ) method.

 
Example
 
var currObj = document.activeElement;
 
Value

Element object reference.

 
Default

None.


Powered by Linode.