<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.

disabledSets or returns whether the checkbox should be disabled.Yes
checkedSets or returns whether the checkbox should be selected.Yes
defaultCheckedReturns the default value of the checked attribute.Yes
formReturns a reference to the form that contains the checkbox.Yes
nameSets or returns the name of the checkbox.Yes
typeReturns the form element type of the checkbox.Yes
valueSets or returns the value of the value attribute of the checkboxYes

Standard Properties and Events

Checkbox objects also support standard properties and events .