本帖最后由 gaowenzhen88 于 2012-08-29 12:15:51 编辑

解决方案 »

  1.   

    jQuery吗???
    对像.unbind("事件名称");//事件名称如果你直接是onclick,那这里要解绑的事件名称应该是click
      

  2.   

    执行代码
    window.onbeforeunload=null;
    把事件成员赋值为null或undefind就可以移除事件函数了
      

  3.   

    如果写成window.onbeforeunload=null;只是弹出来的为空,还是会弹出,离开,或是留在当前页的一个提示框
      

  4.   

    经测试。没有你说的情况。
    注意是将该成员赋值为null,不是return null
    你是不是写错了什么?<html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
    </head>
    <script>
    window.onbeforeunload = onbeforeunload_handler;   
      function onbeforeunload_handler(){
        
      var warning="注意,确认关闭将导致系统崩溃";   
      return warning;   
      }
     
    function removefun()
    {
      window.onbeforeunload=null;
    }
    </script> 
    <body class="frmbase"><form>   
    <div id="box" onclick="removefun()">点击我移除确认弹窗</div>
    </form>   </body>
    </html>
    我的移除很成功
      

  5.   


    非常感谢,确是可行,我大意了,我原来直接 return false没有成功就没有管它了