Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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 IHTMLInputElement::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 IHTMLInputElement::checked content attribute always affect both the IHTMLInputElement::checked content attribute and IHTMLInputElement::defaultChecked Document Object Model (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) For more information on IE8 mode, see Defining Document Compatibility.

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

See also

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

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.