window.addEventListener('beforeunload', function (event) { // Cancel the event as stated by the standard. event.preventDefault(); // Chrome requires returnValue to be set. event.returnValue = '';});该变乱会使网页在脱离或者刷新的时间弹出一个对话框,给用户一个提示。在这个弹框出现时,该页面是做不了任何操纵的,除非把这个弹框关闭。其他页面也只能举行简单的点击欣赏操纵,键盘是操纵不了的。
这个不符适用户无感知的条件
unload