Checkbox : HTMLElement
Return to: HTML DOM Level 0 index

A box that the user can check. For groups of checkboxes, users may select multiple checkboxes.

Platform Support

IE Mozilla Netscape Opera Chrome Safari
3.0+ 1.0+ 2.0+ 7.0+ 5.0+ 1.0+

Constructors

Constructor Action IE Mozilla Netscape Opera Chrome Safari
Creates a new instance of a Checkbox object.
Show Details 3.0+ 1.0+ 2.0+ 7.0+ 5.0+ 1.0+

Checkbox() : Checkbox

Creates a new instance of a Checkbox object.

Returns
Checkbox

Visibility
internal

Properties

Property Action IE Mozilla Netscape Opera Chrome Safari
onclick : Function
Event handler for when the checkbox is clicked.
Show Details 3.0+ 1.0+ 2.0+ 7.0+ 5.0+ 1.0+
See Also

HTMLElement.onclick|EventListener|EventTarget|MouseEvent

Availability

JavaScript 1.0

checked : Boolean
Returns true if the checkbox is checked. False if the checkbox is not checked.
No Details 3.0+ 1.0+ 2.0+ 7.0+ 5.0+ 1.0+
defaultChecked : Boolean
Returns true if the checkbox is checked by default.
No Details 3.0+ 1.0+ 2.0+ 7.0+ 5.0+ 1.0+
value : String
Specifies a string value for when the checkbox is checked.
No Details 3.0+ 1.0+ 2.0+ 7.0+ 5.0+ 1.0+

References

Form|HTMLElement|Input|Radio|HTMLInputElement

Availability

JavaScript 1.0|enhanced in JavaScript 1.1

text_javascript aptana_docs