<SCRIPT language=JavaScript>
function check_window(value1,value2)
{
window.open("check.asp?u_n="+value1+"&n_n="+value2,"",'width=200,height=100');
}
</SCRIPT><INPUT id=check onclick="check_window(document.form.u_n.value,document.form.n_n.value) type=button value="是否占用" name=check>

解决方案 »

  1.   

    也可以通过在子窗口中用opener.document.form.u_n.value,openerdocument.form.n_n.value获得需要的值
      

  2.   

    楼主,首先指出你的代码中有问题:<INPUT id=check onclick="check_window(document.form.u_n.value) type=button value="是否占用" name=check>
    这一行少了个引号,而且加上这个引号后在页面中显示仍然有问题——中间的button按钮会变成一个文本输入框了,建议你改成如下代码:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <SCRIPT language=JavaScript>
    function check_window(value1,value2)
    {
    window.open("check.asp?u_n="+value1+"&n_n="+value2,"",'width=200,height=100');
    }
    </SCRIPT>
    </head>
    <body>
    <table>
    <td>
    <form method="post" action="" name="form">
    <INPUT name="u_n" type="text" id="u_n">
    <INPUT name="n_n" type="text" id="n_n">
    <INPUT name="check" type="button" id="check" value="是否占用" onclick="check_window(document.form.u_n.value,document.form.n_n.value)">
    <INPUT name="pw1" type="text" id="pw1">
    <INPUT name="pw2" type="text" id="pw2">
    <INPUT type="submit" name="Submit" value="Submit">
    </form>
    </td>
    </table>
    </body>
    </html>
    这样就可以同时把u_n和n_n的值都传过去了
      

  3.   

    居然跟我抢生意~~~ >_<