求个退弹代码
    效果是这样的...
    例:   打开   www.baidu.com   刷新页面的时候弹出指定的 页面  
                                  关闭 www.baidu.com 页面  也是指定弹指定页面
           如:www.google.cn 
  
就是说  打开www.baidu.com  刷新 和关闭 www.baidu.com  都回弹出 www.google.cn 页面网上搜了   一大堆相关的,,但是都是坑人的,不管是刷新还是关闭都不会弹出页面求高手给个.....嘻嘻

解决方案 »

  1.   

    现在很多窗口都有弹窗拦截功能的,下面代码只在ie下有效
    <iframe src="http://www.baidu.com" width="100%" height="100%" border="0"></iframe><script type="text/javascript">
    op = function(){
    window.open("http://www.google.cn");
    } window.onbeforeunload = op;
    window.onlocad = op;
    </script>
      

  2.   

    其实这样就够了<iframe src="http://www.baidu.com" width="100%" height="100%" border="0"></iframe><script type="text/javascript">
    op = function(){
    window.open("http://www.google.cn");
    } window.onbeforeunload = op;
    </script>
      

  3.   

    这个只是刷新弹出    关闭不弹的哦
    还有<iframe src="http://www.baidu.com" width="100%" height="100%" border="0"></iframe>
    我意思不是在页面里面包含  www.baidu.com  是举例说明而已..
      

  4.   

    有没兼容 ie6 ie7 ie8  火狐的...
    我写个了    ie6   ie8  火狐测试都没问题 
    然后在ie7  和360浏览器里都不成<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>退弹</title>
    <Script language="javascript">
    var ClosesWindow = true;
    function CheckWindowClosed()
    {
    window.open("http://www.1gcheng.com/70");   
    }
    </script></head><body bgcolor="#ffffff" onBeforeUnload="if(ClosesWindow == true){CheckWindowClosed();}" onmouseover="ClosesWindow=false;" onmouseout="ClosesWindow=true;">
    </body>
    </html>
      

  5.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    </head><body>
    <script>
         window.onbeforeunload=function(){
           if (event.clientX>document.body.clientWidth && event.clientY<0 ||event.altKey)
        {
            window.open('http://www.google.cn')
           }else{
             window.open('http://www.google.cn')
           } 
      }
    </script>

    </body>
    </html>
      

  6.   

        <script>
         //IE   
         window.onbeforeunload=function(){
           if (event.clientX>document.body.clientWidth && event.clientY<0 ||event.altKey)
        {
            window.open('http://www.google.cn')
           }else{
             window.open('http://www.google.cn')
           } 
       }
        //FF兼容F5
       document.onkeyup = function(event){
            if(event.keyCode == 116)window.open('http://www.google.cn')
       }
    </script>
      

  7.   

    哦哦   那也是.昨天我网上看过..写得都是兼容ie6..ie7.ie8.ff...都差不多是这几个主流浏览器...嘻嘻成了..
    谢谢各位啦..