Document.activeElement

  • Revision slug: DOM/document.activeElement
  • Revision title: document.activeElement
  • Revision id: 61027
  • Created:
  • Creator: Mgjbot
  • Is current revision? No
  • Comment robot Adding: [[fr:DOM:document.activeElement]] <<langbot>>

Revision Content

{{template.DomRef()}}

Summary

Returns the currently focused element.

{{template.Note("This attribute is part of the in-development HTML 5 specification.")}}

Syntax

var curElement = document.activeElement;

Example

Specification

Focus management



{{ wiki.languages( { "es": "es/DOM/element.activeElement", "fr": "fr/DOM/document.activeElement", "pl": "pl/DOM/document.activeElement" } ) }}

Revision Source

<p>
{{template.DomRef()}}
</p>
<h3 name="Summary">Summary</h3>
<p>Returns the currently focused element.
</p><p>{{template.Note("This attribute is part of the in-development HTML 5 specification.")}}
</p>
<h3 name="Syntax">Syntax </h3>
<pre class="eval">var curElement = document.activeElement;
</pre>
<h3 name="Example">Example </h3>
<h3 name="Specification">Specification </h3>
<p><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/#focus-management">Focus management </a>
</p><p><br>
</p><p><br>
</p>
<div class="noinclude">
</div>
{{ wiki.languages( { "es": "es/DOM/element.activeElement", "fr": "fr/DOM/document.activeElement", "pl": "pl/DOM/document.activeElement" } ) }}
Revert to this revision