HTML DOM Checkbox Object
Checkbox Object
The Checkbox object represents a checkbox in an HTML form.
In an HTML document, A Checkbox object is created each time it appears.
You can access a checkbox by traversing the form's elements[] array, or by using document.getElementById().
Checkbox Object Properties
W3C: W3C standard.
| property | Description | W3C |
|---|---|---|
| disabled | Sets or returns whether a checkbox should be disabled. | Yes |
| checked | Sets or returns whether a checkbox should be checked. | Yes |
| defaultChecked | Returns the default value of the checked attribute. | Yes |
| form | Returns a reference to the form containing the checkbox. | Yes |
| name | Sets or returns the name of the checkbox. | Yes |
| type | Returns the form element type of the checkbox. | Yes |
| value | Sets or returns the value of the checkbox's value attribute. | Yes |
Standard properties and events
The Checkbox object also supports standard property and Events.