HTML DOM Radio Object
Radio Object
The Radio object represents a radio button in an HTML form.
Each time `<input type="radio">` appears in an HTML form, a Radio object is created.
A radio button is one of a group of mutually exclusive option buttons. When one button is selected, the previously selected button becomes unselected.
When a radio button is selected or unselected, it triggers the onclick event handler.
You can access Radio objects by iterating through the form's elements[] array, or by using document.getElementById().
Radio Object Properties
W3C:W3C Standard.
| Property | Description | W3C |
|---|---|---|
| checked | Sets or returns the state of the radio button. | Yes |
| defaultChecked | Returns the default state of the radio button. | Yes |
| disabled | Sets or returns whether the radio button is disabled. | Yes |
| form | Returns a reference to the form that contains the radio button. | Yes |
| name | Sets or returns the name of the radio button. | Yes |
| type | Returns the form type of the radio button. | Yes |
| value | Sets or returns the value of the radio button's value attribute. | Yes |
Standard Properties and Events
The Radio object also supports standardpropertiesandevents。
Other Extensions