Mega Code Archive

 
Categories / JavaScript Tutorial / Form
 

Radio type

The type property represents the button's TYPE HTML attribute. For this object, it is always radio. <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>