有时候在编辑页面用户做修改后,可能会有刷新、关闭等误操作造成当前页面信息的丢失,何不先提醒一下用户呢?实例代码如下:

 

window.onbeforeunload = function(event){
            event = event || window.event;
            event.returnValue = ' ';
    }

相关文章:

  • 2021-06-20
  • 2022-12-23
  • 2022-02-13
  • 2021-10-18
  • 2022-12-23
  • 2021-12-23
  • 2022-02-08
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案