Input Radio defaultChecked eigenschap
Definitie en gebruik
defaultChecked
De eigenschap retourneert de standaardwaarde van de checked eigenschap.
Als de standaardkeuze knop geselecteerd is, retourneert deze eigenschap true
; otherwise return false
.
Voorbeeld
Check if the radio button is selected by default:
var x = document.getElementById("myRadio").checked;
Syntax
radioObject.defaultChecked
Technical details
Return value: | Boolean value, if the radio button is selected by default, it returns true ; otherwise return false . |
---|
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |