lsc 1 month ago
parent
commit
099ba0ffd6
1 changed files with 7 additions and 0 deletions
  1. 7 0
      js/Desktop/Onload.js

+ 7 - 0
js/Desktop/Onload.js

@@ -43,6 +43,13 @@ window.onload = function () {
     //     initViewport(realHeight, realWidth);
     //     initViewport(realHeight, realWidth);
     //     // window.location.reload();
     //     // window.location.reload();
     // })
     // })
+
+    window.addEventListener('beforeunload', function (event) { 
+        // 阻止默认行为 
+        event.preventDefault(); 
+        event.returnValue = ''; 
+        // / 对某些浏览器有效 
+    });
 }
 }
 
 
 US.Config = {
 US.Config = {