25.26. The Radio Object

The Radio object corresponds to HTML input elements created inside a form through <INPUT TYPE="RADIO" ...>. Radio objects are normally accessed through the elements array of the enclosing Form object. If both the Radio object and the surrounding Form are named, you can access the Radio object through document.formName.radioName.

Properties

checked This is a Boolean property specifying whether the radio button is currently checked. It is read/write.

defaultChecked This is a Boolean specifying whether the radio button should be initially set. It is set through the CHECKED attribute and is read-only in JavaScript.

form This read-only property refers to the Form object containing the radio button.

name This property gives the ...

Get Core Web Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.