Input URL autofocus eigenschap
Definitie en gebruik
autofocus
Eigenschap instellen of teruggeven of het URL-veld automatisch moet worden gefocust wanneer de pagina wordt geladen.
Deze eigenschap reflecteert de HTML autofocus eigenschap.
Zie ook:
HTML Referentie Handboek:HTML <input> autofocus attribute
Voorbeeld
Vergelijk of het URL-veld automatisch wordt gefocust wanneer de pagina wordt geladen:
var x = document.getElementById("myURL").autofocus;
Syntax
Geef de autofocus-eigenschap terug:
urlObject.autofocus
Stel de autofocus-eigenschap in:
urlObject.autofocus = true|false
Eigenschapswaarde
Waarde | Beschrijving |
---|---|
true|false |
Bepaalt of de URL-veld moet worden gefocust wanneer de pagina wordt geladen.
|
Technical details
Return value: | Boolean value, returns if the URL field automatically receives focus when the page is loaded true ; otherwise return false . |
---|
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supported | 10.0 | Supported | Not supported | Supported |