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

HTML DOM Radio checked Property

Radio checked Property

Radio Object Reference Radio object


Definition and Usage

The checked property sets or returns whether a certain radio button is selected.

Syntax

Set the checked attribute:

radioObject.checked=true|false

Return the checked attribute:

radioObject.checked


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the checked attribute


Example

Example

The following example can select and deselect a radio button:

Runoob Tutorial(runoob.com)

Which color do you prefer?

Red

Blue

Green

    

Try it »


Radio Object Reference Radio object