This page is Almost Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

defaultChecked

Summary

Gets whether the checked HTML attribute is present on the element.

Property of dom/HTMLInputElementdom/HTMLInputElement

Syntax

Note: This property is read-only.

var initiallyChecked = checkboxElement.defaultChecked;

Return Value

Returns an object of type BooleanBoolean

Whether the checked HTML attribute is present on the element.

Notes

  • This property reflects the value of the checked HTML attribute.
  • This property can be changed programmatically, however, doing so has no effect on the appearance of the check box or radio button or on how forms are submitted - if the checked property has been changed by a user or by a script.

Related specifications

DOM Level 1
Recommendation

See also

Related pages

Attributions