<input type=button onclick='window.open("new.htm","","")'>
new.htm
<form name=form1 action=myasp.asp>
<input name=mytext>
<input type=button onclick="opener.window.history.go(0);form1.submit();">
</form>

解决方案 »

  1.   

    -------test.html-------
    <Html>
    <Head>
    <Title>Test.html</Title>
    <Script Language="JavaScript">
      <!--
         function NewWindow() {
            var a=window.open("1.htm","_blank");  //生成新窗口
            history.go(0); //刷新当前页面
          }
      -->
    </Script>
    </Head>
    <Body>
    <Input Type="Button" Value="新窗口" OnClick="NewWindow()">
    </Body>
    </Html>-------1.htm-------
    <Html>
    <Head>
    <Title>1.htm</Title>
    </Head>
    <Body>
    <Form Action="*.asp" Method="Post">
      <Input Type="Text" Name="UID">
      <Input Type=Submit>
    </Form>
    </Body>
    </Html>
      

  2.   

    testa.html<script>
    function winOpen(){  
        var winopt = "location=no scrollbars=yes menubar=no status=no resizable=1 width=640 height=400 left=80 top=80";
      window.open("testb.html","win",winopt);
    }</script>
    <input type=button name=b value=test onclick=winOpen(); >testb.html<script>
    function winClose(){
    document.f.action="test.asp" ;
    document.f.submit() ;
        opener.location.reload() ;
    }
    </script>
    <form name=f method=post>
    <input type=text name=t >
    <input type=button name=b value=testclose onclick=winClose(); >
    </form>
      

  3.   

    ------------test.html--------------------
    <HTML>
    <HEAD>
    <TITLE> test</TITLE>
    </HEAD>
    <BODY>
    <form name=form1>
    <input type="button" name="a" value="open" onclick="window.open('bb.html','bb')">
    </form>
    </BODY>
    </HTML>-------------------------bb.html-----------------------------
    <HTML>
    <HEAD>
    <TITLE>bb</TITLE>
    <script language="javascript">
    <!--
    function ee()
    {
    window.opener.location.reload();
    document.form1.submit();}
    -->
    </script>
    </HEAD>
    <BODY>
    <form name=form1 method=post action="qw.asp">
    <input type="test" name="name" size=20>
    <input type="button" name="b" value="submit" onclick="ee()">
    </form>
    </BODY>
    </HTML>
      

  4.   

    我用Save.asp保存数据到数据库,怎么在数据保存后再刷新页面。
      

  5.   

    new.htm
    <form name=form1 action=myasp.asp>
    <input name=mytext>
    <input type=button onclick="form1.submit()">
    </form>
    myasp.asp
    <%
    '此处写入数据库
    %>
    <body onload=opener.window.history.go(0)>
      

  6.   

    save之后:
    <%Response.Redirect "youasp.asp"%>