Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Checkbox object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Checkbox object


Checkbox object

The Checkbox object represents a selection box in an HTML form.

Checkbox objects are created every time they appear in HTML documents.

You can access a selection box by traversing the form's array of elements, or by using document.getElementById().


Checkbox object properties

W3C: W3C standard.

Attributes describe W3C
disabled Set or return Checkbox to be disabled. Yes
checked Set or returns Checkbox to be selected. Yes
defaultChecked Returns the default value for the checkage attribute. Yes
form Returns a reference to a form that contains CheckBox. Yes
name Set or return the name of Checkbox. Yes
type Returns Checkbox's form element type. Yes
value Set or return the value of the value attribute of Checkbox Yes

Standard properties and events

Checkbox objects also support standard properties and events.