A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/autofocus below:

HTMLElement: autofocus property - Web APIs

HTMLElement: autofocus property

Baseline 2023

Newly available

The autofocus property of the HTMLElement interface represents a boolean value reflecting the autofocus HTML global attribute, which indicates whether the control should be focused when the page loads, or when dialog or popover become shown if specified in an element inside <dialog> elements or elements whose popover attribute is set.

Only one form-associated element inside a document, or a <dialog> element, or an element whose popover attribute is set, can have this attribute specified. If there are several, the first element with the attribute set inserted, usually the first such element on the page, gets the initial focus.

Note: Setting this property doesn't set the focus to the associated element: it merely tells the browser to focus to it when the element is inserted in the document. Setting it after the insertion, that is most of the time after the document load, has no visible effect.

Value

A boolean value.

Specifications Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4