js 关闭窗口

        var userAgent = navigator.userAgent;
        if (userAgent.indexOf("Firefox") != -1 || userAgent.indexOf("Presto") != -1) {
            window.location.replace("about:blank");
        } else {
            window.opener = null;
            window.open('', '_parent');
            window.close();
        }

  

posted @ 2014-10-17 14:26  b̶i̶n̶g̶.̶  阅读(133)  评论(0编辑  收藏  举报