<form name="frm"> <br><input type="radio" value="1" name="radioName"><br><input type="radio" value="2" name="radioName"><br><input type="button" onclick="alert(CheckRadio(this.form.radioName));"><br> </form> <br><script language="javascript"><br/><!--<br/>//求单选按纽的值,适用单选项及多选项。未选返回false;有选择项,返回选项值。<br/>function CheckRadio(theRadio){<br/> var theRadioLen = theRadio.length;<br/> var theRadioValue = false;<br/> if (theRadioLen == undefined){<br/> if (theRadio.checked){<br/> theRadioValue = theRadio.value;<br/> }<br/> }else{<br/> for (theRadioI=0;theRadioI<theRadioLen;theRadioI++){<br/> if (theRadio[theRadioI].checked){<br/> theRadioValue = theRadio[theRadioI].value;<br/> break;<br/> }<br/> }<br/> }<br/> return theRadioValue;<br/>}<br/>//--><br/></script> <center> </center> <p style="width:100%;text-align:center;margin:10px 0"> <br> <br> </p> <p style="width:100%;text-align:center;margin:10px 0"> </p> <p class="clear"></p>