chrome 浏览器 window.close没用(求一种能关闭当前网页的方法)

在网上查百度,说下面的代码有用
window.location.href = "about:blank";                   
window.close();
但是 我用的时候 window.close()依然没有用,只是不报错了。

执行到 window.location.href = "about:blank"; 就停了
求大神帮忙!

https://blog.csdn.net/u011501574/article/details/40787691

open(url, '_self').close();

试试吧 ,详细范例如下:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="{CHARSET}">
        <title></title>
        <script language="JavaScript" type="text/javascript">
         function closeWindow()
        {
        window.open("http://my.laiwuwangzhan.com","_self").close(); 
        }
</script>
</head>

    <body>
        <input onclick="closeWindow()" value="点我测试代码" />
    </body>
</html>