Radio

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

Core client-side JavaScript object.

Description

The Radio object represents a check box within an HTML form. A check box is created using the HTML <input> tag and specifying the TYPE attribute as radio. The Radio object has specific properties and methods associated with it, as shown in Table 7.40.

Table 7.40. Properties and Methods of the Radio Object
Property/Method Description
blur() Removes focus from Radioobject
checked Specifies whether a button is checked or unchecked
click() Simulates a mouse click on the button
defaultChecked Refers to the CHECKEDattribute of the HTML <input>tag
focus() Sets the focus to a button
form Refers to the Formobject that contains ...

Get Pure JavaScript 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.