找遍了許多問題堆棧溢出,並可能是重複的這裏Detect Popup如何在Chrome中檢測彈出式窗口攔截器?
但not helped for me
測試時在鉻(測試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的更好的解決方案?
爲什麼羽絨服選民......有問題的問題是什麼?我無法理解 – 2013-05-20 06:53:57
有些人認爲瀏覽器行爲是一種不好的做法。我個人覺得這很有用。 – BradGreens 2014-04-08 19:12:12