A box that the user can check. For groups of checkboxes, users may select multiple checkboxes.
Browser/User Agent Support
| IE | Mozilla | Netscape | Opera | Safari | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|---|
Constructors
| Constructor | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|
Creates a new instance of a Checkbox object. | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
Properties
| Property | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|
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
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.
