Radio.type

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

							radio.type

Description

The type property of the Radio button represents the button's TYPE HTML attribute. For this object, it is always radio.

Example

Listing 7.442 shows an example of the type property.

Listing 7.442 Example of the type Property
<html>
<head>
<title> Example of the radio type property</title>
</head>
<body>

<form name="form1">
<input type="radio" name=button1>Box 1
<br><br>
<input type="button" value="Get Button Type"
onClick='alert("The button type is: " + document.form1.button1.type)'>
</form>

</body>
</html>
							
							
						

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.