下面这段代码可以在页面关闭的时候自定义信息提示你

<html>
<head>
<title></title>
<script type="text/javascript">

function ConfirmClose() {
window.event.returnValue
= "请先保存好数据";
}

function ShowConfirmClose(blnValue) {
if(blnValue) {
document.body.onbeforeunload
= ConfirmClose;
}
else {
document.body.onbeforeunload
= null;
}

}
</script>
</head>
<body onload="ShowConfirmClose(true)">
</body>
</html>

相关文章:

  • 2021-11-09
  • 2022-12-23
  • 2021-09-12
  • 2022-01-25
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-28
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案