mozilla
Your Search Results

    HTMLElement.focus()

    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
    The definition of 'focus' in that specification.
    Working Draft  
    HTML5
    The definition of 'focus' in that specification.
    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

    Hide Sidebar