Mega Code Archive

 
Categories / JavaScript Tutorial / Form
 

Radio value

The value property represents the VALUE attribute of the HTML tag used to create the radio button. <html>     <head>     <title> Example of the radio value property</title>     </head>     <body>     <form name="form1">     <input type="radio" name=button1 value=1>Box 1     <br><br>     <input type="button" value="Get Button Value"     onClick='alert("The button value is: " + document.form1.button1.value)'>     </form>     </body>     </html>