.focus()

Term side of the Card
Topic: Object on Page
Unit title: .focus()
Categories: Method
Explanation side of the Card

Explanation: The browser API method that sets focus on a specified element, making it the active element in the document. When an element is focused, it can receive keyboard and other input events.

Browser compatibility:
  • The chrome browser supports this feature starting from version 1
  • The edge browser supports this feature starting from version 12
  • The firefox browser supports this feature starting from version 1.5
  • The safari browser supports this feature starting from version 3
Availability: