我要实现多组单选按钮组选择的值一行行的显示到另一个独立的文本中或div中(求ASP代码)先谢了  困恼。。 
(像选择题一样,我要把很多产品配件一种种的供用户选择,选择后显示到同一个页面上,我要这个里面的cc或dd也要显示到DIV中去  一行行的显示  麻烦大家替我看看  真的很急) 
这是我做的提问修改一下
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link href="ww.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#Layer1 {
    position:absolute;
    left:896px;
    top:22px;
    width:116px;
    height:237px;
    z-index:1;
}
-->
</style>
</head><body>
<div id="Layer1"><div   id='div1'   style="display:''">aa的内容</div>   
  <div   id='div2'   style="display:none">bb的内容</div>   </div>
<form action="" method="get">
  <p>
    <input   type='radio'   name='aa'   onclick="div1.style.display='';div2.style.display='none'"   checked>
    aa    </p>
  <p>
    <input   type='radio'   name='aa'   onclick="div1.style.display='none';div2.style.display=''">
    bb </p>
  <p>
    <label>
    <input type="radio" name="RadioGroup1" value="单选" /> 
    cc
</label>
    <br />
    <label>
    <input type="radio" name="RadioGroup1" value="单选" /> 
    dd
</label>
    <br />
  </p>
  
</form>
</body>
</html>

解决方案 »

  1.   


    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
    <title>无标题文档 </title> 
    <link href="ww.css" rel="stylesheet" type="text/css" /> 
    <style type="text/css"> 
    <!-- 
    #Layer1 { 
        position:absolute; 
        left:896px; 
        top:22px; 
        width:116px; 
        height:237px; 
        z-index:1; 

    --> 
    </style> 
     <script type="text/javascript">
          function setvalue()
          {
             var e=document.getElementsByTagName("input");
             var values="";
             
             for(var i=0;i<e.length;i++)
             {
                if(e[i].type=="radio");//是单选
                {
                   if(e[i].checked)
                   {
                      values+=","+e[i].value;
                   }
                }
             }
             document.getElementById("values").value=values;
             alert(document.getElementById("values").value);
             
          }
       </script></head> <body> 
    <div id="Layer1"> <div  id='div1' >aa的内容 </div>  
      <div  id='div2'  style="display:none">bb的内容 </div>  </div> 
    <form action="" method="get"> 
       <input type="radio" name="xz1" value="1"/> 种类一
                                 <input type="radio" name="xz1" value="2"/> 种类二 
                                 <input type="radio" name="xz2" value="3"/> 种类三
                                 <input type="radio" name="xz2" value="4"/> 种类四
                                 <input type="radio" name="xz3" value="5"/> 种类五
                                 <input type="radio" name="xz3" value="6"/> 种类六 
                                 <input id="Hidden1" name="value" type="hidden" />   
                                 <input type="button" name="btntj" value="提交" onclick="setvalue()" />  
    </form> 
    </body> 
    </html> 
    结帖率:0.00% 
    其它的还是算了,不写啦!