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

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

问题描述

朋友,
我想检查Internet Explorer 8弹出窗口阻止程序是否已启用或在我的应用程序中未使用javascript?请不要发布任何网址.
请尽快回复.
我正在使用此代码,请检查并修改一次.

Hi Friends,
I want to check internet explorer 8 popup blocker is enabled or not using javascript in my application?Please don''t post any url.
Please reply asap.
i''m using this code please check and modify once.

<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" language="javascript">
        winHandle=window.open("","","")
        if(winHandle==null){
            alert("Error: While Launching New Window...nYour browser maybe blocking up Popup windows. nn Please check your Popup Blocker Settings");
         }
    </script>
</head>


此代码在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

推荐答案

发布网址有什么问题?一个好的网址可能会给您带来不仅仅是解决方案的信息.

究竟是什么与您的代码不兼容?因为这是这样做的方法.在window.open语句后放置一个alert(winHandle);,您将看到要检查的内容.您会发现不仅将返回null -s.因此,请扩展您的条件:
What''s wrong with posting url''s? A good url might give you more than just a solution.

And what exactly is not working with your code? Since this is the way to do it. Put an alert(winHandle); after window.open statement and you will see what to check. You will find that not only null-s will be returned. So expand your conditions:
if(typeof(winHandle)==='undefined' || winHandle==null )


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

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