首页 > 强制关闭网页

强制关闭网页

/*强制关闭网页*/
function closeWebPage() {document.querySelector("html").style.display = "none";let ua = navigator.userAgent, w = top;if (ua.indexOf("MSIE") > 0) {if (ua.indexOf("MSIE 6.0") > 0) {w.opener = null;w.close();} else {w.open("", "_top");w.close();}} else if (ua.indexOf("Firefox") > 0) {w.location.replace("about:blank");} else {w.opener = null;w.open("", "_self", "");w.close();}
}

更多相关: