FREE Web Template Download
HTML CSS JAVASCRIPT SQL PHP BOOTSTRAP JQUERY ANGULARJS TUTORIALS REFERENCES EXAMPLES Blog
 

Input Radio defaultChecked Property

Input Radio Object Reference Input Radio Object

Example

Check if a radio button is checked by default:

var x = document.getElementById("myRadio").checked;

The result of x will be:

true
Try it Yourself »

Definition and Usage

The defaultChecked property returns the default value of the checked attribute.

This property returns true if the radio button is checked by default, otherwise it returns false.


Browser Support

Property
defaultChecked Yes Yes Yes Yes Yes

Syntax

radioObject.defaultChecked

Return Value

Type Description
Boolean Returns true if the radio button is checked by default, otherwise it returns false.

Input Radio Object Reference Input Radio Object