up: programming - HTML  
HTML
radio button
What links here?
Radio buttons come in groups. They are bound together as a group by having the same name:
<INPUT TYPE="radio" NAME="rad" VALUE="radio_button1">foo
<INPUT TYPE="radio" NAME="rad" VALUE="radio_button2">bar
<INPUT TYPE="radio" NAME="rad" VALUE="radio_button3">zot
<INPUT TYPE="radio" NAME="rad" VALUE="radio_button4">harry


Gives:

foo
bar
zot
harry


A particular radio button can be preselected with the "CHECKED" attribute:

<INPUT TYPE="radio" NAME="rad" Value="rad_button1" CHECKED>


Or with Javascript:

form.rad[0].checked = true;  // sets to first button in the rad group


Finding the selected radio button with Javascript:

function test_radio_button (form){
    for (Count = 0; Count < 3; Count++) {
        if (form.rad[Count].checked)
            break;
    }
    alert ("Button " + Count + " is selected");
}
programming - HTML - radio button
programming - windows - MoveWindow
programming - pascal - procedure - insert
programming - sqlite - operations
programming - Pascal
programming - C - function isalpha
programming - forth
programming - C - function iscntrl
linux - bash shell test
programming:c:function fgets
programming - programming links
programming:c:function fputc
programming - windows - networking - select based server
programming - C - function utime
filename:programming - HTML - radio button
filename:programming%20%2D%20HTML%20%2D%20radio%20button
last edit:November 09 2012 12:33:10 (5022 days ago)
ct = 1786425779.000000 = August 11 2026 01:22:59
ft = 1352482390.000000 = November 09 2012 12:33:10
dt = 433943389.000000