1. 论坛系统升级为Xenforo,欢迎大家测试!
    Dismiss Notice

转:避免弹出窗口被如Google工具条拦截的解决办法

Discussion in '网站运营' started by oicq我爱玩, Jun 22, 2006.

  1. oicq我爱玩

    oicq我爱玩 New Member

    Joined:
    Jan 27, 2006
    Messages:
    5,205
    Likes Received:
    28
    现在网络弹出窗口乱七八糟,很多人不愿意看到弹出广告窗口,可是有的有用的窗口又想让别人看到,用window.opne方法打开窗口都被拦截了,一下方法可以解决让你的窗口不被诸如Google工具条拦截。就算开启了拦截功能也不会拦截。
    一下代码在IE6SP1,GOOGLE工具条(开启拦截弹出窗口),测试通过
    default.htm

    <script language="javascript">
    var test = window.showModalDialog('openwindow.htm','OpenWindow','');
    window.opener = null;
    window.close();
    </script>

    openwindow.htm
    <script language="javascript">
    function openFullScreen(){
    window.open("default1.htm","full","fullscreen");//Default1.htm文件为你要弹出的窗口文件
    window.returnValue = "TEST";
    window.close();
    }
    openFullScreen();
    </script