A box that the user can check. For groups of checkboxes, users may select multiple checkboxes.
Platform Support
| IE | Mozilla | Netscape | Opera | Chrome | Safari | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Chrome | Safari | ||
|---|---|---|---|---|---|---|---|---|---|
|
Checkbox Constructor() : Checkbox
Creates a new instance of a Checkbox object.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ | ||
Checkbox() : CheckboxCreates a new instance of a Checkbox object. Returns
|
|||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Chrome | Safari |
|---|---|---|---|---|---|---|---|
|
onclick
: Function
Event handler for when the checkbox is clicked.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|||||||
|
Returns true if the checkbox is checked. False if the checkbox is not checked.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|
|||||||
|
Returns true if the checkbox is checked by default.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|
|||||||
|
Specifies a string value for when the checkbox is checked.
|
No Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 5.0+ | 1.0+ |
|
|
|||||||
References
Form|HTMLElement|Input|Radio|HTMLInputElement
Availability
JavaScript 1.0|enhanced in JavaScript 1.1