<input> - checkbox
HTML DOM Checkbox object
Checkbox object
The Checkbox object represents a check box in an HTML form.
A Checkbox object is created each time <input type="checkbox"> appears in an HTML document.
You can access a select box by iterating over the form's elements[] array, or by using document.getElementById().
Checkbox Object Properties
W3C: W3C standard.
Attribute | Description | W3C |
---|---|---|
disabled | Sets or returns whether the checkbox should be disabled. | Yes |
checked | Sets or returns whether the checkbox should be selected. | Yes |
defaultChecked | Returns the default value of the checked attribute. | Yes |
form | Returns a reference to the form that contains 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 value attribute of the checkbox | Yes |
Standard Properties and Events
Checkbox objects also support standard properties and events .