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

HTML DOM Checkbox defaultChecked attribute

Checkbox defaultChecked attribute

Checkbox Object Reference Checkbox Object


Definition and Usage

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

This attribute returns true if the checkbox is checked by default, otherwise it returns false.

Syntax

checkboxObject.defaultChecked


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the defaultChecked attribute


Example

Example

The example below returns the value of the checked attribute:

Runoob Tutorial(runoob.com)

Do you like summer?

Try it »


Checkbox Object Reference Checkbox Object