微信公众号:
调试工具不行
WeixinJSBridge.call('closeWindow');
普通网页:
if (navigator.userAgent.indexOf('MSIE') > 0) { // close IE
if (navigator.userAgent.indexOf('MSIE 6.0') > 0) {
window.opener = null;
window.close();
} else {
window.open('', '_top');
window.top.close();
}
} else { // close chrome;It is effective when it is only one.
window.opener = null;
window.open('', '_self');
window.close();
}