Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Radio defaultChecked Property

Radio defaultChecked Property

Radio Object Reference Radio object


Definition and Usage

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

If the default state of the radio button is selected, returns true, otherwise returns false.

Syntax

radioObject.defaultChecked


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the defaultChecked attribute


Example

Example

Check whether the "Blue" option is selected by default:

Runoob Tutorial(runoob.com)

Which color do you prefer?

Red

Blue

Green

Try it »


Radio Object Reference Radio object