HTML and CSS Reference
In-Depth Information
To reach a value in the radio list, for example, you would use d ocument.form1.radio1 ,
where form1 is the name of the form, and radio1 is the name of the radio object.
Figure 11.41 shows the JavaScript object hierarchy for the radio object. Tables 11.17
and 11.18 list the properties and methods of the radio object.
Table 11.17 Properties of the radio Object
Property
What It Describes
accessKey
Sets or retrieves the keyboard key to access a radio button.
alt
Sets or returns alternate text to display if a browser does not support
radio buttons.
checked
Is true if the radio button was selected, false if not.
defaultChecked
Refers to the checked attribute of the radio input tag—what the user
sees as a default checked box when the buttons first appear.
form
The name of the form where the radio buttons are defined.
id
Sets or retrieves the id of a radio button.
name
The name used to reference the radio input tag.
tabIndex
Sets or retrieves the tab order for a radio button.
type
Refers to the type attribute of the radio input tag.
value
Refers to the value attribute of the radio input tag.
Table 11.18 Methods of the radio Object
Method
What It Does
blur()
Removes focus from the select box.
click()
Simulates a mouse being clicked on the button.
focus()
Puts focus in the select box.
handleEvent()
Invokes the handler for a specified event (JavaScript 1.2).
unwatch()
Turns off the watch for a particular property.
watch()
Watches, and when a property is changed, calls a function.
 
Search WWH ::




Custom Search