var a=document.getElementsByTagName("input")
for(var i=0;i<a.length;i++)
{
  if(a[i].type="radio")alert(a[i].value)}

解决方案 »

  1.   

    <input type="radio" value="0">非技术问题
    <input type="radio" value="1">技术问题
    <input type="button" value="click" onclick="check()"><script>
    function check(){
    for(var i=0;i<document.length;i++)
    if(typeof(document.elements[i])=="radio")
    if(document.elements[i].checked)
    alert(document.elements[i].value);
    }
    </script>
      

  2.   

    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>新建网页 2</title>
    </head><body>
    <input type="radio" value="0">非技术问题
    <input type="radio" value="1">技术问题
    <script language="javascript">
    <!--
    var o = document.getElementsByTagName("INPUT");
    for(var i = 0; i<o.length;i++)
    {
    if(o[i].type=="radio")
    {
    alert(o[i].value);
    }
    }
    //-->
    </script>
    </body></html>
      

  3.   

    <input type=radio id='p'  name='p' value="非技术问题" onclick="p.value='非技术问题'">非技术问题
    <input type=radio id='p' name='p' value="技术问题" onclick="p.value='技术问题'">技术问题
    <input type=button value="get value" onclick="alert(p.value)">