window.onbeforeunload = function () {
return "你确认关闭么?不兼容OP的说。。";
};

解决方案 »

  1.   

    <!--IE下的默认关闭方法,IE会弹一个对话框让用户确认-->
    <a href="javascript:window.close()">Default Close</a>
    <!--IE6下可以用window.opener绕过这一个限制-->
    <a href="javascript:window.operner="x";window.close()">Close IE6</a>
    <!--IE7下可以用这样的方法-->
    <a href="javascript:window.open('','_top'); window.top.close();">Close IE7</a>
      

  2.   

    我只会这点了
    <script>
    function Sure() {
    if (window.confirm("您查看的网页正在试图关闭窗口。\n\n是否关闭此窗口?"))
    this.close();
    }
    </script>
    <a href="javascript:Sure()">关闭窗口</a>
      

  3.   


    function window.onbeforeload(){
       if(event.clientX>360&&event.clientY<0||event.altKey){
          window.event.returnValue="确认退出?";
       }
    }
      

  4.   

    不好意思,写错 window.onbeforeunload()
      

  5.   

               this.LG_a00067.OnClientClick = "if(window.confirm('" + Language.Msg("a00102") + "')==false){window.event.returnValue=false;return false;}";
    第一种  function CheckItems()
            {
      if(window.confirm('<%=FSSoft.Web.UI.Language.Msg("00400") %>')==false) 
               {
                   window.event.returnValue=false;return false;
               }        }
    第二种
      

  6.   

    直接<a href=javascript:window.close();>关闭</a>