在aa页面中写如下代码
function chk_quit()
{
  if ( confirm ( "请确认是否退出系统?" ) )
   {  
window.open('bb.html,'_blank'); 
window.close(); 
    }
}
我是这样写的,打开bb页面关闭aa页面,但是当前页aa页面关闭不掉,请高人指教.

解决方案 »

  1.   

    window.location("bb.html");
    什么意思啊!
      

  2.   

    window.location.hreft="/xxx/xxx.aspx"相当于<a href="/xxx/xxx.aspx"></a>
      

  3.   


      <script type="text/javascript">
    function chk_quit()
    {
      if ( confirm ( "请确认是否退出系统?" ) )
      {   
    window.open('b.html','_blank');  
    window.opener=null;//可以不出现“您的浏览器正在试图关闭当前窗口”的提示
    window.close();  
      }
    }
    </script>
    其实你本来是可以弹出来的,是b.html后边少了个单引号
      

  4.   

    直接在当前页跳转不行吗?非要再打开一个?
    if(confirm("确认退出?")){
        window.location = "bb.html";
    }  
    非要关了这个再开一个的话 
    if(confirm("确认退出?")){
      window.open("bb.html","_blank");
    }
    然后在新页面里写上
    <script>
     window.onload=function(){
       window.opener.close();
     }
    </script>应该可以吧
      

  5.   


    window.location("bb.html");就是跳转到bb这个页面
      

  6.   


    <script language="javascript">
    function closewin()
    {
    if(confirm("你确定要关闭窗口吗?"))
    {
    window.open("while.html","while");
    window.close();
    }
    else
    alert("窗口未关闭");
    }
    </script>
    </head><body>
    <input type="button" value="关闭窗口" onclick="closewin()" />
    </body>在你关闭当前窗口的时候,打开一个新的窗口:
    当if条件为真时,立即打开你的目标网页(我这是while.html),同时在原来的那个网页弹出一个警告窗口"您查看的网页正在试图关闭选项卡。是否关闭此选项卡",然后单击“是”,就关闭原来网页了!