用window.open()打开窗口时,传递测试应该这么写
window.open('b.jsp?c=xxxxxxxxxxx','','height=200, width=500,scrollbars=yes,resizable=yes'
弹出窗口不会得到submit的值

解决方案 »

  1.   

    只有在form里面通过action="b.jsp"传递参数时才可以用input的名字c来传
      

  2.   

    addjava(添砖加瓦) 说的对!
      

  3.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>New Page 1</title>
    </head>
    <body>
    function btnTest_onclick()
    {
      var msg;
      var page;
      param=new Array(2);
      param[0]=frmtest.c.value;
      param[1]=frmtest.……;
      ……
      page="b.jsp";
      msg=window.showModalDialog(page,param,"dialogHeight: 220pt; dialogWidth: 400pt;center: Yes;resizable: Yes;status:no;scroll:no");
    }
    <form id=frmtest>
      <p><input type="text" name="c" size="20>
     <input type="button" name="btntest" value="提交" id="btntest" onClick="javascript:btnTest_onclick()">
    <p>
    </form>
    </body>
    </html>
    应该行,回去试试
      

  4.   

    fnction test(){
        window.open('b.jsp?c='+form.c.value,'','height=200, width=500,scrollbars=yes,resizable=yes'}
      

  5.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>New Page 1</title>
    </head>
    <script language="JavaScript">
    fnction test(){
        window.open('b.jsp?c='+frmtest.c.value,'','height=200, width=500,scrollbars=yes,resizable=yes'}
    </script>
    <body>
    <form name=frmtest>
      <p><input type="text" name="c" size="20>
     <input type="button" name="btntest" value="提交" id="btntest" onClick="javascript:test()">
    <p>
    </form>
    </body>
    </html>