(0) exportieren Drucken
Alle erweitern
EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.
13 von 26 fanden dies hilfreich - Dieses Thema bewerten.

activeElement property

Gets the object that has the focus when the parent document has focus.

Syntax

JavaScript

p = object.activeElement

Property values

Type: Object

the element that has the focus.

Remarks

You can set the active element with the setActive method or the focus method; however, using the setActive method has no effect on document focus. Use the focus method to cause an individual element to gain focus and become the active element.

The active element retains focus in the parent document even when focus is shifted from the parent to another application. If the focus returns to the parent document, focus also returns to the same active element.

Note  For versions of Microsoft Internet Explorer 5 and later, the activeElement property is not defined until a document is loaded. A value of null is given for this property, if it is accessed inline during the loading of a document. This property can be accessed in the onload event handler function.

Note  Microsoft Internet Explorer 4.0 returns body as the activeElement when it is accessed inline during the loading of a document.

See also

document

 

 

Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)
Vielen Dank für Ihr Feedback.
Anzeigen:
© 2014 Microsoft. Alle Rechte vorbehalten.