日期:2014-05-16 浏览次数:20432 次
<script> window.onunload=e; function e(){ closes.Click(); return; window.close(); } </script> <OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="Command" value="Close"> </object>
------解决方案--------------------
用onbeforeunload事件。无论快捷键还是点击菜单的刷新,都会有提示,关闭页面时也会出现。
<script>
window.onbeforeunload=function(){window.event.returnValue='刷什么新,快按“取消”吧!';}
</script>
------解决方案--------------------
楼上正解
<html>
<head></head>
<script>
function LeftConfirm()
{
window.event.returnValue="确认刷新页面吗?";
}
</script>
<body onbeforeunload="LeftConfirm()">
</body>
</html>