Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!

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  

Notes

If you call HTMLElement.focus() from a mousedown event handler, you must call event.preventDefault() to keep the focus from leaving the HTMLElement.

See also

문서 태그 및 공헌자

 최종 변경: jakobc,