window.addEventListener("beforeunload", function (e) {
var confirmationMessage = "\o/";
(e || window.event).returnValue = confirmationMessage; // Gecko and Trident
return confirmationMessage; // Gecko and WebKit
});
beforeunload 事件触发刷新时的确认提示
最新推荐文章于 2024-07-29 09:23:41 发布