` appears in the HTML document, a Checkbox"> ` appears in the HTML document, a Checkbox" />
Easy Tutorial
❮ Prop Area Alt Prop Keygen Form ❯

HTML DOM


Checkbox Object

The Checkbox object represents a checkbox in an HTML form.

Each time an <input type="checkbox"> appears in the HTML document, a Checkbox object is created.

You can access a specific checkbox by iterating through the form's elements[] array or by using document.getElementById().


Checkbox Object Properties

W3C: W3C Standard.

Property Description W3C
disabled Sets or returns whether the checkbox should be disabled. Yes
checked Sets or returns whether the checkbox should be checked. 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 type of the form element for the checkbox. Yes
value Sets or returns the value of the value attribute of the checkbox. Yes

Standard Attributes and Events

The Checkbox object also supports standard attributes and events.

❮ Prop Area Alt Prop Keygen Form ❯