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 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

IHTMLInputElement::checked

 

 

Community Additions

ADD
Show:
© 2014 Microsoft