Javascript Reference
Categories: InputTypeCheckbox

javascript InputTypeCheckbox checked

@March 15, 2008, 1:22 a.m.
checkedFirefox/Netscape/NN 2 IE 3 Chrome/Safari/DOM 1  

Read/Write  

Specifies whether the checkbox is selected or turned on by the user (or script). Checkboxes operate independently of each other. Only checkbox objects with the checked property set to true have their name/value pair submitted with the form. To find out whether the form element is set to be checked when the page loads, see the defaultChecked property. Scripts can change this property even if the element is disabled.

 
Example
 
if (document.choiceForm.monitors.checked) {
    //process for the "monitors" checkbox being checked
}
 
Value

Boolean: true | false.

 
Default

false


Powered by Linode.