解决方案 »

  1.   

    window.opener = null;
    window.open('','_self');
    window.close();這樣試試
      

  2.   

    onepage关联的内容在本页内打开
    或者在本页内跳转新页面 在跳回
      

  3.   

    1.关联的内容在本页内打开是不存在这个问题,但第二个页面是由servlet的request.forward跳转到的新页面
    2.再跳回也不行,试过了
    谢谢您的回答。
      

  4.   

    我也遇到了类似的问题,谷歌浏览器关不掉。
    window.opener = null;
    window.open('','_self');
    window.close();
    这样也不行。
      

  5.   

    人家说了,close只能用来关闭window.open打开的窗口。
    window.opener = null;
    window.open('','_self');
    window.close();
    这些都属于类似漏洞级的方法,chrome的执行的东西都是很严格的
      

  6.   

    现在打开窗口都是采用div做的,怎么关闭都可以的
      

  7.   

    open(url, '_self').close();需要有个跳转的地方,跳转到主目录可以让url = ‘ ’;(有空格)
    stackoverflow上的
    链接
    http://stackoverflow.com/questions/19761241/window-close-and-self-close-do-not-close-the-window-in-chrome
      

  8.   

    \
    <button class="close" onclick="javascript:window.open(location, '_self').close();">关闭</button>
    <button class="close" onclick="javascript:window.open(location, '_self').close();">关闭</button>这样子
      

  9.   

    open(‘ ’, '_self').close();
    加了空格,chrome下还是不行。楼主怎么解决的?
      

  10.   

    地址栏输入A网址,进入A。在A页面中window.open打开B页面。现在要关闭A,window.close在chrome下不行。
    LS有解决办法没?