Radio.defaultChecked

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

							radio.defaultChecked

Description

The defaultChecked property of the Radio object is a Boolean value that reports which radio buttons contain the HTML CHECKED attribute. If the CHECKED attribute is contained in the Radio object, true is returned. Otherwise, false is returned.

Example

Listing 7.434 shows how the defaultChecked property is used to find out which box is checked by default.

Listing 7.434 Example of the defaultChecked Property
 <html> <head> <title> Example of the radio defaultChecked property</title> </head> <body> <script language="JavaScript"> <!-- Hide function checkBox(){ if(document.form1.button1.defaultChecked == true){ alert("Box1 is ...

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.