如何检查internetexplorer版本8弹出框是否已启用? [英] how to check internetexplorer version 8 popup block is enabled or not?

查看:82
本文介绍了如何检查internetexplorer版本8弹出框是否已启用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网页中如何检查Internet Explorer 8弹出框是否已启用或未使用JavaScript?请不要发布网址.
请尽快回复.
我正在使用此代码,请检查并修改一次.

In my webpage how to check internet explorer 8 popup block is enabled or not using javascript?Please don''t post url.
Please reply asap.
i''m using this code please check and modify once.

<script language="javascript" type="text/javascript">
ns4=document.layers
ie8=document.all
ns6=document.getElementById&&!document.all
var xWin=null; var ticks=6;
function ChangeLabel0(txt){
if(ns4){document.layers.label0.innerHTML=txt}
if(ie8){document.all.label0.innerHTML=txt}
if(ns6){document.getElementById("label0").innerHTML=txt}
}

function StartT(){
StartPopup();
window.focus();
ChangeLabel0("<b>Popup window appears in "+ticks+" sec. Wait please...</b>");
}
function StartPopup(){
xWin=window.open("popuptest.htm","","");
alert('xWin ' +xWin);
setTimeout("test_xWin()",700);
}
function test_xWin(){
// alert("typeof(xWin)="+typeof(xWin));
// alert("typeof(xWin.location.href)="+typeof(xWin.location.href));
// alert("xWin="+xWin);
// alert("xWin.location.hash="+xWin.location.hash);
if ( (xWin==null)||(typeof(xWin)=="undefined") ||(typeof(xWin.location.hash)!="string")
// ||(xWin.location.hash!="#abc")
){sMsg="<font color=#FF0000><b>A popup killer is detected</b></font>";}
else{sMsg="<font color=#008000><b>There is NO popup killer detected</b></font>";};
//alert("xWin="+xWin+" type="+typeof(xWin)+" typeloc="+typeof(xWin.location.hash)+" hash="+xWin.location.hash);
window.focus();
ChangeLabel0(sMsg);
}
function hi()
{
alert('hi');
StartT();
return false;
}
</script>
</head>
<body onload="return hi();" >
<form id="form1" runat="server">
<div id="label0"></div>
</form>
</body>
</html>





此代码在ie9版本和其他浏览器中也可以使用.但是我想在Internetexplorer的早期版本中检查弹出窗口阻止程序.任何机构都可以帮助我.


谢谢&问候
Hari





this code is working in ie9 version and other browsers also.but i want check popup blocker in previous versions of internetexplorer.can any body help me.


Thanks & Regards
Hari

推荐答案



您是否尝试过在Google中搜索此内容?我找到了这个讨论,并且您有问题的答案此处 [
Hi,

Have you tried to search in google for this ? I found this discussion and there is answer of you question Here[^]

Hope it works for you.


互联网选项->>隐私->>取消选中弹出窗口阻止程序.....
internet options-->> privacy-->> uncheck pop up blocker.....


这篇关于如何检查internetexplorer版本8弹出框是否已启用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆