document.YourFormName.YourRadioName.value

解决方案 »

  1.   

    百合,又看见你了。对啊,这是个很简单的问题,就用百合兄的代码就可以实现了--当然你的代入你自己的实际的form的名称和radio的名称啦  :)
      

  2.   

    Hello, But I used this, and it prompt error
    the following is my code<FORM name=frmProcJProcessed onsubmit="return CheckData();" >
    <B>FeedBack</B> 
    <INPUT type=radio value=5 name="UsrFeedBk">Excellent 
    <INPUT type=radio value=4 name="UsrFeedBk">Good 
    <INPUT type=radio value=3 name="UsrFeedBk">Normal 
    <INPUT type=radio value=2 name="UsrFeedBk">Lower 
    <INPUT type=radio value=1 name="UsrFeedBk">Poor<B>Re</B><INPUT size=40 name=UsrRe>
    <DIV align=center><INPUT type=submit value=" FeedBack "> 
    </DIV></FORM><SCRIPT language=JavaScript>
        function CheckData(){
            alert(this.document.frmProcJProcessed.UsrRe.value);
            alert(this.document.frmProcJProcessed.UsrFeedBk.value);
            return true;
        }
    </SCRIPT>and when I submit it, it will prompt "undefined"Thanks for your help
      

  3.   

    function CheckRadio(_obj){
      for(i=0;i<_obj.length;i++)
        if(_obj[i].checked) return _obj[i].value;
      return "no selected"
    }
    function CheckData(){
      alert(document.all["UsrRe"].value);
      alert(CheckRadio(document.all["UsrFeedBk"]));
      return true;
    }