Checkbox : HTMLElement

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

Browser/User Agent Support

IEMozillaNetscapeOperaSafari
3.0+1.0+2.0+7.0+1.0+

Constructors

ConstructorIEMozillaNetscapeOperaSafari
Creates a new instance of a Checkbox object.
3.0+1.0+2.0+7.0+1.0+
 

Properties

PropertyIEMozillaNetscapeOperaSafari
Event handler for when the checkbox is clicked.
3.0+1.0+2.0+7.0+1.0+
 
Returns true if the checkbox is checked. False if the checkbox is not checked.
3.0+1.0+2.0+7.0+1.0+
 
Returns true if the checkbox is checked by default.
3.0+1.0+2.0+7.0+1.0+
 
Specifies a string value for when the checkbox is checked.
3.0+1.0+2.0+7.0+1.0+
 

References

Form | HTMLElement | Input | Radio | HTMLInputElement

Availability

JavaScript 1.0 | enhanced in JavaScript 1.1

Constructor Detail

Checkbox Checkbox()

Creates a new instance of a Checkbox object.

Visibility
internal

Property Detail

static Function onclick

Event handler for when the checkbox is clicked.

See Also

HTMLElement.onclick | EventListener | EventTarget | MouseEvent

Availability

JavaScript 1.0

Boolean checked

Returns true if the checkbox is checked. False if the checkbox is not checked.

Boolean defaultChecked

Returns true if the checkbox is checked by default.

String value

Specifies a string value for when the checkbox is checked.