element.focus Redirect 1

There was a scripting error on this page. While it is being addressed by site editors, you can view partial content below.

{{ APIRef }}

The HTMLElement.focus() method sets focus on the specified element, if it can be focused.

Syntax

element.focus()

Specification

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'focus' in that specification.
Living Standard  
HTML5.1 (draft)
The definition of 'focus' in that specification.
Working Draft  
HTML5
The definition of 'focus' in that specification.
Candidate Recommendation  
Document Object Model (DOM) Level 2 HTML Specification
The definition of 'focus' in that specification.
Recommendation  
Document Object Model (DOM) Level 1 Specification
The definition of 'focus' in that specification.
Recommendation  

See also

Document Tags and Contributors

 Last updated by: Sheppy,