Home >> Tutorials >> Advanced javascript tutorials |
Automatically Selected | Disable/Lock Radio Button | Radio Button Links | validate 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 . <INPUT TYPE="RADIO" NAME="agree" VALUE="yes" CHECKED>Yes. Yes No 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>. <SCRIPT LANGUAGE="JavaScript" > Now to make radio button links put the following code between <body> </body> . <form name="testform"> Checkbox examples Developer zone contat us |
Page contents: itechies.net – Learn how to make Radio Button Links,disable a radio button |