Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

defaultChecked property

Sets or retrieves the state of the check box or radio button.


HRESULT value = object.put_defaultChecked( v);HRESULT value = object.get_defaultChecked(* p);

Property values



Default. Check box or radio button is selected by default.


Check box or radio button is not selected by default.

Standards information


The property can be changed programmatically, but doing so has no effect on the appearance of the check box or radio button or on how forms are submitted.

Windows Internet Explorer 8 and later. In IE8 Standards mode, the IHTMLInputElement::defaultChecked Document Object Model (DOM) attribute reflects the value of the IHTMLInputElement::checked content attribute. For more information, see Attribute Differences in Internet Explorer 8.

Internet Explorer 8 and later. In IE8 mode, parsing operations on the IHTMLInputElement::checked content attribute always affect both the IHTMLInputElement::checked content attribute and IHTMLInputElement::defaultChecked DOM attribute. For example, IHTMLEventObj2::removeAttribute sets both IHTMLInputElement::checked and IHTMLInputElement::defaultChecked to VARIANT_FALSE. Similarly, IHTMLElement::setAttribute sets both DOM attributes to VARIANT_TRUE (as if the element was being re-parsed).

See also




Community Additions

© 2015 Microsoft