没必要验证吧,给它一个默认值不就可以了。
--------------------------------------------------------------<FORM  name="form1" action="register.asp" method=post>  
    <input type="radio" name="a" value="d" checked>
    <input type="radio" name="a" value="c">  
    <input type="submit" name="Submit" value="sub">   
</form>

解决方案 »

  1.   

    document.form1.a.checked == false
      

  2.   

    不是这样的,document.form1.a取到的是一个数组,不是一个radioBox,所以会出错,使用下面这个方法来取<script language="javascript">
    /**
     *get the value of a group of radiobox
     *@param radioBox the object of radioBox
     *@return the value of the radioBox checked or false for none checked
     *@example var value = getRadioValue(this.form1.radioGroup);
     */
    function getRadioValue(radioBox){
        try{
            if(radioBox == null){
                return false;
            }
            var length = radioBox.length;
            if(length == null){
                if(radioBox.checked)
                    return radioBox.value;
       else
           return false;
            }else{
                for(i = 0; i < length; i++) {
                   if(radioBox[i].checked)
                       return radioBox[i].value;
       }
                return false;
            }
        }catch(e) {
            return false;
        }
    } function FormCheck(){ 
        if(!getRadioValue(document.form1.a)){
    alert("222");
    return false;
        }
    }</script>