Input Radio autofocus eigenschap
Definitie en gebruik
autofocus
Instellen of retourneren van de keuzevork die automatisch focus moet krijgen bij het laden van de pagina.
Deze eigenschap reflecteert de HTML autofocus-eigenschap.
Zie ook:
HTML Referentiemanual:HTML <input> autofocus attribute
Voorbeeld
Onderzoek of de keuzevork automatisch focus krijgt bij het laden van de pagina:
var x = document.getElementById("myRadio").autofocus;
Syntax
Retourneren van de autofocus-eigenschap:
radioObject.autofocus
Instellen van de autofocus-eigenschap:
radioObject.autofocus = true|false
eigenschapswaarde
waarde | omschrijving |
---|---|
true|false |
Specifies whether the radio button should receive focus when the page is loaded.
|
Technical details
Return value: | Boolean value, if the radio button automatically receives focus when the page is loaded, it returns true ; otherwise return false . |
---|
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | 10.0 | Support | Support | Support |