关闭旧窗口的时候老提示有试图关闭窗口 然后 是 否
怎么取消这个?
我查了很多说
window.opener=null;
window.open('','_self');
window.close();
这样可以,但是这样也没法打开新窗口了,
有办法关闭旧窗口的同时 打开新窗口并且去掉那个提示吗?

解决方案 »

  1.   


    <script language="javascript">
     if(window.opener==null)
     {
     window.opener=null;
     window.close();
     window.open('Login.asp','页面','height=240, width=320,top=150,left=300,toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, status=yes')
     }
     </script>
      

  2.   

    不可用哟
    我自己解决了
    可惜不能给自己分~
    Page.RegisterStartupScript("", "<script>window.open('main.aspx','_blank','toolbar=0,location=1,directories=no,status=1,menubar=0,scrollbars=0,resizable=0,width=1024,height=670,left='+(window.screen.width-1024)/2+',top='+(window.screen.height-670)/2+'');window.opener='X';window.open('','_parent',''); window.close()</script>");