EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

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.

See also

document

 

 

Mostrar:
© 2014 Microsoft