打开页面:location.href="yourfile.htm"
关闭时打开一个页面:unonload="location.href='yourfile.htm'"
覆盖本页面,就是在<a href=yourfile.htm target=_self>close</a>(关闭本窗口,打开yourfile.htm文件)

解决方案 »

  1.   

    <body unonload="window.open('a.htm','newwindow','width=300,height=300')">
      

  2.   

    把代码贴出来大家看一下,这是c页面,c页自动关闭并且打开一非模式窗口:如下代码
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>about:blank</title>
    <script>
    function loadpage()
    {
      var newWin=window.showModalDialog("index.htm","title","dialogHeight: 300px; dialogWidth: 480px; center: yes; help: no"); 
      newWin.focus();
      newWin.moveTo(0,0);  
    }
    </script></head><body unonload="loadpage();">  //没有响应事件,窗口关闭非模式窗口没有打开。请问如何做</body>
    </html>
      

  3.   

    对,你不应该用window.showModalDialog,而应该用window.open