在IE和FireFox下都支持的窗口退出提示
By 男生贞子 发表于 2006-10-14 14:43:00
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
zringCheckUnload = true;
window.onbeforeunload = function() { if(zringCheckUnload)return("您确定退出该页面么?");}
</script>
<body>
</body>
</html>
By 男生贞子 发表于 2006-10-14 14:43:00
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
zringCheckUnload = true;
window.onbeforeunload = function() { if(zringCheckUnload)return("您确定退出该页面么?");}
</script>
<body>
</body>
</html>
本文提供了一个在IE和Firefox浏览器中均可使用的JavaScript代码示例,用于在用户退出网页前显示确认提示,确保用户不会意外离开当前页面。
3102

被折叠的 条评论
为什么被折叠?



