none
IE的弹出广告阻止问题(The problem for pop-up ads for IE9, bilingual version) RRS feed

  • 问题

  • 我这是实在找不到地方向微软提出建议了,就在这里说吧。

    (It's unpossible for me to hand in this feed back to Microsoft. So I want to talk about this problem here)

    分网站存在弹出窗口(一般都是广告)问题,刚一打开网页的弹出窗口都可以被Internet Explorer成功阻止并显示“Internet Explorer已阻止弹出窗口”

    但是这些网页大部分是,单击该网页的任意位置,就弹出窗口。希望微软相关部门能够解决此问题。

    相关代码如下:

    There are a number of websites which exist problems of pop-up ads. The pop-up windows can be successfully banned by Internet Explorer and show a bar to tell us. But most of the websites can still ahow their ads as soon as we click anywhere of the websites. I sincerely hope that Microsoft can solve this problem.

    This is one possible version of the codes:

    *******************************************************************************************************

    <script type="text/javascript">

    var isPoped = false;

    document.onclick = function()

    {

    if (!isPoped)

    {

    window.open('http://****(任意网站名,此处以星号代替)(The *s stands for the name of the websites.)/');

    isPoped = true;

    }

    }

    </script>

    *****************************************************************************************************************

    另外,还有一些网页显示浮动广告(你使用滚轮或滚动条移动浏览区域,它将一直显示不随网页移动而离开视野)。这类广告更烦人,尤其是对于那些屏幕较窄的用户。我们通常的做法是,在“Internet 选项”——“安全”——“自定义级别(Internet域)”——“禁用Java小程序脚本或者禁用活动脚本”。但是这导致我们连hotmail都无法登陆。那么一个一个在安全域中增加站点也太麻烦了。

    请解决相关问题吧。我相信,如果把它们解决了,那么对于IE浏览器市场占有率将大有帮助,我们也就不用求助于360、搜狗等浏览器了,毕竟微软IE系列对操作系统兼容性更好。

    我的计算机当前情况:

    Windows版本:6.1.7601

    Internet Explorer版本:9.0.8112.16421

    代码如下(one possible version

    By the way, some sites may show float ads which can always be seen although you try to read the other area of the web by the wheel of the mouse. This kind of ads can be much more annoying especially to the user who has a narrow screen.

    Please solve the problem as soon as possible! I believe that IE will be more successful.

    Current condition of my computer:

    Windows version: 6.1.7601

    Internet Explorer version: 9.0.8112.16421

    *********************************************************************************************

    <html>

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

    <title>漂浮广告(float ads)</title>

    </head>

    <body>

    <DIV id=img1 style=" WIDTH: 59px; HEIGHT: 61px;

     "><a href="/jscss/" target="_blank"><img src="/jscss/demoimg/200908/pic.gif" width="80" height="80" border="0"></a></DIV>

    <SCRIPT>

    var xPos = 300;

    var yPos = 200;

    var step = 1;

    var delay = 30;

    var height = 0;

    var Hoffset = 0;

    var Woffset = 0;

    var yon = 0;

    var xon = 0;

    var pause = true;

    var interval;

    img1.style.top = yPos;

    function changePos()

    {

             width = document.body.clientWidth;

             height = document.body.clientHeight;

             Hoffset = img1.offsetHeight;

             Woffset = img1.offsetWidth;

             img1.style.left = xPos + document.body.scrollLeft;

             img1.style.top = yPos + document.body.scrollTop;

             if (yon)

                       {yPos = yPos + step;}

             else

                       {yPos = yPos - step;}

             if (yPos < 0)

                       {yon = 1;yPos = 0;}

             if (yPos >= (height - Hoffset))

                       {yon = 0;yPos = (height - Hoffset);}

             if (xon)

                       {xPos = xPos + step;}

             else

                       {xPos = xPos - step;}

             if (xPos < 0)

                       {xon = 1;xPos = 0;}

             if (xPos >= (width - Woffset))

                       {xon = 0;xPos = (width - Woffset);   }

             }

            

             function start()

              {

                     img1.visibility = "visible";

                       interval = setInterval('changePos()', delay);

             }

             function pause_resume()

             {

                       if(pause)

                       {

                                clearInterval(interval);

                                pause = false;}

                       else

                       {

                                interval = setInterval('changePos()',delay);

                                pause = true;

                                }

                       }

             start();

    </SCRIPT>

    </body>

    </html>

    **************************************************************************************

    (another possible version)

    ***********************************************************************************

    "< DIV id=floater1 style=" WIDTH: 100px; height: 100px;" >  

    左边的东西,可以是图片,表格(What's on the left side can be a chart or a picture)

    < /DIV > 

    < DIV id=floater style=" RIGHT: 10px; WIDTH: 100px; " >  

    右边的东西,可以是图片,表格  (What's on the right side can be a chart or a picture)

    < /DIV >" 

    把下列代码存成文件包含到网页中就行了(Everything is OK if you save the following codes and include them in the website)

    menus.js的代码如下: 

    self.onError = null; 

    currentX = currentY = 0;  

    whichIt = null;  

    lastScrollX = 0; lastScrollY = 0; 

    NS = (document.layers) ? 1 : 0; 

    IE = (document.all) ? 1: 0; 

    function heartBeat(objectid) { 

    if(IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; } 

    if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } 

    if(diffY != lastScrollY) { 

    percent = .1 * (diffY - lastScrollY); 

    if(percent > 0) percent = Math.ceil(percent); 

    else percent = Math.floor(percent); 

    if(IE) { 

    objectid = objectid.split(";");  

    for (i = 0; i < objectid.length; i++) eval("document.all."+objectid[i]).style.pixelTop += percent; 

    }   

    if(NS) { 

    objectid = objectid.split(";");  

    for (i = 0; i < objectid.length; i++) eval("document."+objectid[i]).top += percent;  

    }  

    lastScrollY = lastScrollY + percent; 

    } 

    if(diffX != lastScrollX) { 

    percent = .1 * (diffX - lastScrollX); 

    if(percent > 0) percent = Math.ceil(percent); 

    else percent = Math.floor(percent); 

    if(IE) { 

    objectid = objectid.split(";");  

    for (i = 0; i < objectid.length; i++) eval("document.all."+objectid[i]).style.pixelLeft += percent; 

    }  

    if(NS) { 

    objectid = objectid.split(";");  

    for (i = 0; i < objectid.length; i++) eval("document."+objectid[i]).left += percent;  

    }  

    lastScrollX = lastScrollX + percent; 

    }  

    } 

    if(NS || IE) action = window.setInterval("heartBeat(’floater;floater1’)", 2);

    ***************************************************************************************************

    期盼贵公司的佳音。

    (I'm looking forward to the reply of success.)



    • 已编辑 hpmlo 2012年6月13日 13:54 将部分汉语翻译成英语以适用于西方国家
    2012年6月13日 13:27