window.addEventListener("beforeunload", function (e) {
window.event.returnValue = "真的要刷新页面么?";
return '2222';
});
How to self-customized the prompt box warning words when closing or updating an unsaved page in Chrome , and listen the confirm or cancal button click event ?