Input Radio defaultChecked Attribute
Definition and Usage
defaultChecked
This property returns the default value of the checked attribute.
If the radio button is selected by default, this property returns true
; otherwise return false
.
Example
Check if the radio button is selected by default:
var x = document.getElementById("myRadio").checked;
Syntax
radioObject.defaultChecked
Technical Details
Return value: | Boolean value, returned if the radio button is selected by default true ; otherwise return false . |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |