X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

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:

false

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

Internet Explorer Firefox Opera Google Chrome Safari

The defaultChecked property is supported in all major browsers.


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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook