这个问题,在b.asp中
<form onkeypress="guagua()"
<input type=text name=gua>
<script>
function guagua()
{
if((window.event.keyCode==13)&&document.all.gua.value!="")
{window.open("a.asp?gua="+document.all.gua.value)}function setvalue(myvalue)
{document.all.gua.value=myvalue;}
</script>在a.asp中先查询
<table width="63%" border="0" cellspacing="2" cellpadding="0" >
    <% while not rs.eof %>
    <tr bgcolor="#cbd9e4">
      <td height="22"> 
        <div align="center"><a href="opener.setvalue('<%=rs(0) %>');"><%=rs(0) %>&nbsp;</a></div>
      </td>
      <td height="22"> 
        <div align="center"><%=rs(1) %></div>
      </td>
      <td height="22"> 
        <div align="center"><%=rs(2) %></div>
      </td>
    </tr>
    <%
rs.movenext()
wend
%>
  </table>

解决方案 »

  1.   

    前不久解决的,基本上完全相同
    http://expert.csdn.net/Expert/topic/1761/1761274.xml?temp=.5421869
      

  2.   

    我要的不是这种啊,a.asp是以附属窗口的形式出现的
    我将的我的代码发给大家
    b.asp
    <%@Language=VBScript%>
    <html>
    <head>
    <title></title>
    <script language="javascript">
    function check()
    {
    if (event.keyCode==13)
    {
    event.keyCode="#0";

    var test=document.test.username.value;
    window.open('bb.asp?test='+test,'register','left=10,top=135,width=200,height=380,status=no,toolbars=no,menubars=no,scrollbars=no,resize=no');
    }
    return true; }</head>
    <body><form name="test">
    <input type="text" name="username" onkeydown="check()" 
    <input type="button" name="测试" value="测试"></form>
    </body>
    </html>
    a.asp
    <html>
    <head>
    <title>无标题文档</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="javascript">
     function check(){
      var aa=document.form1.username.value
      location.href="aa.asp?username="+aa;
     self.close();
     }
    </script> 
    </head><body bgcolor="#FFFFFF" text="#000000">
    <form action="b.asp" method="post" name="form1">
    <input type="radio" value="aaa" onclick="check()" name="username">sdfgd
    </form>
    </body>
    </html>
    我现想将值a.asp中value的值"aaa"传入b.asp的username文本框中
      

  3.   

    opener.document.test.username.value="aaa"
      

  4.   

    如果传过去的值 是一个数组,在select框中如何处理呢?