HTML DOM Radio objects
Radio Object
Radio object represents an HTML form radio button.
In the HTML form <input type = "radio"> Every once, a Radio object is created.
Radio buttons is a set of mutually exclusive options buttons. When a button is selected, previously selected button becomes unselected.
When the radio button is selected or not selected, the button will trigger the onclick event handler.
You can iterate through the form elements [] array to access Radio objects, or by using document.getElementById ().
Radio Object Properties
W3C: W3C standards.
属性 | 描述 | W3C |
---|---|---|
checked | 设置或返回单选按钮的状态。 | Yes |
defaultChecked | 返回单选按钮的默认状态。 | Yes |
disabled | 设置或返回是否禁用单选按钮。 | Yes |
form | 返回一个对包含此单选按钮的表单的引用。 | Yes |
name | 设置或返回单选按钮的名称。 | Yes |
type | 返回单选按钮的表单类型。 | Yes |
value | 设置或返回单选按钮的 value 属性的值。 | Yes |
Standard properties and events
Radio objects also supports the standard attributes and events .