checked  !<script>
function checkRadio(f){
for(i=0;i<f.r.length;i++)if(f.r[i].checked)return true;
alert('请选择')
return false
}
</script>
<form name=frm2 onsubmit="return checkRadio(this)">
<input type=radio name=r><input type=radio name=r>
<input type=radio name=r><input type=radio name=r>
<input type=submit>
</form>

解决方案 »

  1.   

    需要这么复杂?因为我下页处理时可以用 request("radioname") 获取值的呀,能不能直接判断值?
      

  2.   

    <input type = radio name =aa onclick = "if (this.checked == true) alert('yes');">
    <input type = radio name =aa onclick = "if (this.checked == true) alert('yes');" >
      

  3.   

    alert(document.dataform.gxdd[0].value)
    alert(document.dataform.gxdd[1].value)
      

  4.   

    alert(typeof(document.dataform.gxdd.value)=="undefined")
      

  5.   

    radio的值想用javascript取出来只能这么麻烦