Javascript Reference
Categories: InputTypeRadio

javascript InputTypeRadio checked

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

Read/Write  

Determines whether the radio button is selected or turned on by the user or script. Only radio 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.myRadio[0].checked) {
    //process first radio button
}
 
Value

Boolean: true | false.

 
Default

false


Powered by Linode.