还有一个怎么把B里面的表格中的一个数据传到A里面的TEXT里面呢?谢谢

解决方案 »

  1.   

    在b窗口弹出的时候,在写open时加一个参数然后b在取得就行了啊!!就像b.aspx?参数名=a中的值,然后在b中取得这个值就行了!!
      

  2.   


    dim str1,str2 as string 
    a.htm:
    window.open('B.htm?a=" & str1 & "&b=" & str2 & "')b.htm :服务器
    text1.value = Request.QueryString("a")text2.value=Request.QueryString("b")
      

  3.   

    我想用showModalDialog,因为B里面的参数我也要返回到A中的,是相互传递数据。但是具体的代码我不会写
      

  4.   

    a.htm
    var r = showModalDialog("b.htm", "传入值", "");
    alert(r);b.htm
    alert(window.dialogArguments);
    window.returnValue = "返回值";
      

  5.   

    a.htm<a href="b.htm?xx=aa">ok</a>b.htm
    <body onload="document.f.i.value=(window.location.href).split('=')[1]">
    <form name=f>
    <input name=i>
    </form>也可以在a.htm做变量,用opener.xx取到
      

  6.   

    a.htm
    <SCRIPT LANGUAGE="JavaScript">
    function ento(url,para)
    {
    var oWin=window.open(url,"b");
    deal(para);
    }
    function deal(para)
    {
    try{
    if(oWin.document.body.readyState=="complete"){
    oWin.frm.txt.value=para;
    }
    }
    catch(e){
    setTimeout("check()",10);
    }
    }
    </SCRIPT>
    <a href="javascript:ento('b.htm')">XX</a>b.htm
    <form id=frm>
    <input id=txt>
    <form>
      

  7.   

    <a href="javascript:ento('b.htm','在b.htm的文本框中要显示的值')">XX</a>
      

  8.   

    window.showModalDialog('a.aspx?a=" & a & "&b=" & b & "','','DialogHeight:54px;DialogWidth:43px')b.htm :服务器
    text1.value = Request.QueryString("a")text2.value=Request.QueryString("b")
      

  9.   

    showmodaldialog.htm:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head>
    <script language="JavaScript">
    function showdia()
    {
    var a;
    a=showModalDialog("dia.htm?a=hao",document.all.text1.value,"dialogwidth=200px;dialogheight=100px");
    text1.value=a
    }
    </script>
    <body>
    <input type="text" value="传入1" name="text1">
    <input type="button" value="传入值" name="btn" onClick="showdia();">
    </body>
    </html>
    ///////////////////
    dia.htm
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head>
    <script language="JavaScript">
    function button1_click()
    {
    window.returnValue=document.all.text1.value;
    window.close();
    }
    </script>
    <body onLoad="javascript:document.all.text1.value=window.dialogArguments;" onUnload="javascript:button1_click();">
    <input type="text" name="text1" value="">
    <input type="button" value="guanbi" onClick="button1_click();">
    </body>
    </html>