Export (0) Print
Expand All

defaultChecked property

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

Syntax

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

Property values

Type: VARIANT_BOOL

VARIANT_TRUE (true)

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

VARIANT_FALSE (false)

Check box or radio button is not selected by default.

Standards information

Remarks

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 IHTMLOptionButtonElement::defaultChecked Document Object Model (DOM) attribute reflects the value of the IHTMLOptionButtonElement::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 IHTMLOptionButtonElement::checked content attribute always affect both the IHTMLOptionButtonElement::checked content attribute and IHTMLOptionButtonElement::defaultChecked DOM attribute. For example, IHTMLEventObj2::removeAttribute sets both IHTMLOptionButtonElement::checked and IHTMLOptionButtonElement::defaultChecked to VARIANT_FALSE. Similarly, IHTMLElement::setAttribute sets both DOM attributes to VARIANT_TRUE (as if the element was being re-parsed).

See also

IHTMLOptionButtonElement::checked

 

 

Community Additions

ADD
Show:
© 2014 Microsoft