Document.activeElement (Property)

The input element that currently has input (keyboard and mouse) focus.

Availability:

JScript - 3.0
Internet Explorer - 4.0
Property/method value type:An object that can receive input focus
JavaScript syntax:IEmyDocument.activeElement

This property contains a reference to the element object that currently has the input focus.

This may refer to an input element but if there is no active <FORM> in the document then the active element will be the window object that the document is displayed in.

See also:Document object, Frame object, Window object

Property attributes:

ReadOnly