页面刷新或关闭时提醒是否离开页面

页面刷新或关闭时提醒是否离开页面

window.onbeforeunload = function (e) {
  e.returnValue = "确定关闭页面?";
  return warning;
}

posted @ 2016-01-26 11:12  Viola_left  阅读(384)  评论(0编辑  收藏  举报