skip to contentstylized crane logoWhite Crane Education

Checkbox Objects

The checkbox type represents an HTML "checkbox": <input type="checkbox"> =


onblur onclick ondblclick onfocus
onkeydown onkeypress onkeyup onmousedown
onmouseenter onmouseleave onmousemove onmouseout
onmouseover onmouseup


checked returns/sets whether or not the box is checked
defaultChecked returns/sets whether the box is checked by default
form returns a reference to the form to which the control belongs
name returns/sets the value of the checkbox's name attribute
type returns the value of the checkbox's type attribute
value returns/sets the value of the checkbox's value attribute


blur() takes the focus away from the checkbox
click() duplicates a mouse click on the checkbox including causing the onclick event to fire
focus() moves the focus to the checkbox