Jelajahi Sumber

fix:设置全局,将alert弹框的ip和端口替换

414057798 5 tahun lalu
induk
melakukan
9934f8fbca
1 mengubah file dengan 9 tambahan dan 0 penghapusan
  1. 9 0
      src/main/webapp/pages/open/common/head_script.jsp

+ 9 - 0
src/main/webapp/pages/open/common/head_script.jsp

@@ -16,4 +16,13 @@
         location.href = "<%=basePath%>/open/account/login.htm";
         return false;
     }
+
+    window.alert = function(name){
+        var iframe = document.createElement("IFRAME");
+        iframe.style.display="none";
+        iframe.setAttribute("src", 'data:text/plain,');
+        document.documentElement.appendChild(iframe);
+        window.frames[0].window.alert(name);
+        iframe.parentNode.removeChild(iframe);
+    };
 </script>