我在堆栈溢出中搜索了许多问题,并且可能在此处 重复Detect Popup
但是not helped for me
在Chrome中测试时(测试 v26.0.1410.64)
遵循方法Worked in IE and Firefox
但是not in Chrome
var popup = window.open(winPath,winName,winFeature,true);
if (!popup || popup.closed || typeof popup.closed=='undefined'){
//Worked For IE and Firefox
alert("Popup Blocker is enabled! Please add this site to your exception list.");
window.location.href = 'warning.html';
} else {
//Popup Allowed
window.open('','_self');
window.close();
}
还有更好的适用于 Chrome 的解决方案吗?