关闭网页时如何弹出消息框? 关闭网页时如何弹出消息框 提醒用户:您确认关闭吗 ? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <BODY onbeforeunload="event.returnValue='您确认关闭吗';"></BODY> <body onunload="return confirm('要离开吗?')"> <script type="text/javascript"> function closeIt() { if(event.clientX > document.body.clientWidth && event.clientY<0||event.altKey) { //window.event.returnValue="确定要退出本页吗?"; alert('我要退出啦!') //document.frames.exitframes.location.reload("exit.aspx?id=2"); } else { return false; } } </script></head><body onunload="closeIt()"> <form id="form1" runat="server"> <div> </div> </form></body> <body onbeforeunload="RunOnBeforeUnload();" function RunOnBeforeUnload() { if (true) {window.event.returnValue = '如果是,你将丢失没有保存的内容。'; } } <input type="button" value="取消" onclick="window.close()"/>当前窗口关闭 <body onunload="return confirm('Leave?')"> Up firefox 中iframe 调用父窗口自定义函数怎么写 进来下 如何获得动态生成的行的位置 SQL存储过程问题!请高手帮忙!大伙来看看!顶着有分不够+分! .net express和profession有什么区别 js如何取checkboxlist的值 DataGrid关于列的问题 急,急...关于一个测试网站的问题???? asp.net读取word文档时被拒绝访问 关于DataGrid的表头问题。急! 下面的是如何jq实现的额 datalist 编辑 时出现错误!
<script type="text/javascript">
function closeIt()
{
if(event.clientX > document.body.clientWidth && event.clientY<0||event.altKey)
{
//window.event.returnValue="确定要退出本页吗?";
alert('我要退出啦!')
//document.frames.exitframes.location.reload("exit.aspx?id=2");
}
else
{
return false;
}
}
</script></head>
<body onunload="closeIt()">
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
<body onbeforeunload="RunOnBeforeUnload();" function RunOnBeforeUnload() {
if (true) {window.event.returnValue = '如果是,你将丢失没有保存的内容。';
}
}
<body onunload="return confirm('Leave?')">
Up