Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
checked
Collapse the table of content
Expand the table of content

checked property

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

HTML 4.01 Specification, Section 17.4

 

Syntax

HRESULT value = object.put_checked( v);HRESULT value = object.get_checked(* p);

Property values

Type: VARIANT_BOOL

false

Default. Control is not selected.

true

Control is selected.

Standards information

Remarks

Check boxes that are not selected do not return their values when the form is submitted.

A user can select a radio button only if the button has a IHTMLOptionButtonElement::name. To clear a selected radio button, a user must select another button in the set.

Windows Internet Explorer 8 and later. In IE8 Standards mode, parsing operations on the IHTMLOptionButtonElement::checked content attribute always affect both the IHTMLOptionButtonElement::checked content attribute and IHTMLOptionButtonElement::defaultChecked Document Object Model (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) For more information on IE8 mode, see Defining Document Compatibility.

Internet Explorer 8 and later. In IE8 mode, the IHTMLOptionButtonElement::defaultChecked DOM attribute reflects the value of the IHTMLOptionButtonElement::checked content attribute.

See also

Reference
IHTMLOptionButtonElement::defaultChecked
Conceptual
Introduction to Forms
Form controls part 1
Form controls part 2: validation

 

 

Community Additions

ADD
Show:
© 2015 Microsoft