通过JavaScript检查弹出窗口阻止程序
问题描述:
如何使用JavaScript检查所有版本的Inernet Explorer中是否启用或禁用了弹出窗口阻止程序?
感谢您提供任何提示!
How can I check if popup blocker is enabled or disabled in all versions of Inernet Explorer using JavaScript?
Thanks for any hints!
答
您是否尝试过以下方法:测试对于使用JavaScript的弹出窗口阻止程序 [ ^ ]
链接来自 David Walsh博客 [ ^ ].
问候,— Manfred
Have you tried something like this: Test For Popup Blocker Using JavaScript[^]
Link taken from David Walsh Blog[^].
Regards,— Manfred
以下代码用于无法访问上述网站
var windowName =``userConsole'';
var popUp = window.open(''/popup-page.php'',windowName,``width = 1000,height = 700,left = 24,top = 24,滚动条,可调整大小'');
如果(popUp == null || typeof(popUp)==''未定义''){
alert(请禁用您的弹出窗口阻止程序,然后再次单击打开"链接.");
}
其他{
popUp.focus();
}
问候
Chandru
The below code is for not having access to the above website
var windowName = ''userConsole'';
var popUp = window.open(''/popup-page.php'', windowName, ''width=1000, height=700, left=24, top=24, scrollbars, resizable'');
if (popUp == null || typeof(popUp)==''undefined'') {
alert(''Please disable your pop-up blocker and click the "Open" link again.'');
}
else {
popUp.focus();
}
regards
Chandru
我试图..itz仅在有条件的情况下检查..
i tried..itz check only if condition..