Home >> Tutorials >> Advanced javascript tutorials
Automatically SelectedDisable/Lock Radio ButtonRadio Button Linksvalidate radio button

A radio button is a circular button on your web page that can be selected by the user.

How to create a radio button
The tag to put a radio button on your web site is <INPUT TYPE="RADIO" NAME="yes" VALUE="1">. Yes

Automatically Selected 

Sometimes you want a radio button is already selected when the user loads the page. To automatically select a radio button, add the line CHECKED to the <INPUT TYPE=”RADIO” NAME=”agree” VALUE=”yes”> tag .


Disable Radio Button

Some times you don’t want the users to edit the radio button selection.You can do this by Disabling a radio button. Disabling a radio button means that the radio button is grayed out . To disable a radio button, add the line DISABLED to the <INPUT TYPE=”RADIO” NAME=”agree” VALUE=”yes”> tag so the final result looks like 

How to make Radio Button Links:Place the following code between the <head> </head>.
<!-- hide
function load(url) {
window.location.href =url; 

Now to make radio button links put the following code between <body> </body>
.<form name="testform">
<input type="radio" name="rb" onClick="load('cbeg.htm');">Checkbox examples
<input type="radio" name="rb" onClick="load('https://www.itechies.net/developers.htm');"> Developer zone
<input type="radio" name="rb" onClick="load('mailto:info@itechies.net');"> contat us

Checkbox examples 
 Developer zone
 contat us

Page contents: itechies.net – Learn how to make Radio Button Links,disable a radio button