应该是
alert("Value:"+myform.cctype[0].value);

解决方案 »

  1.   

    function getQue(){
    l =document.getElementsByName("cctype")
    for(i=0;i<l.length,i++) alert(l[i].value)
    }***********
    <form name="myform" action="" method="post">
    <input type="radio" name="cctype" value="1">1
    <input type="radio" name="cctype" value="2">2
    <input type="radio" name="cctype" value="3">3
    </form>
    <a href="javascript:getQue()">click</a>
      

  2.   

    <script language="JavaScript">
    <!--
    function getQue(){
    l =document.getElementsByName("cctype");
    for(i=0;i<l.length;i++) if(l[i].checked)alert(l[i].value)
    }
    //-->
    </script>
    ***********
    <form name="myform" action="" method="post">
    <input type="radio" name="cctype" value="1">1
    <input type="radio" name="cctype" value="2">2
    <input type="radio" name="cctype" value="3">3
    </form>
    <a href="#" onclick="getQue();return false">click</a>
      

  3.   

    是不是必须先循环整个radio数组,确定哪个被选后才能得到该值?有没有象select中的selectedIndex之类的属性?