Browse Source

页面跳转

elis 2 years ago
parent
commit
78d5364fab
1 changed files with 11 additions and 0 deletions
  1. 11 0
      nngkxxdp/src/main/resources/static/hqzc/index.html

+ 11 - 0
nngkxxdp/src/main/resources/static/hqzc/index.html

@@ -26,6 +26,15 @@
 <script src="jquery-3.6.1.js"></script>
 
 <script type="text/javascript">
+    if (isMobileUserAgent()) {
+        window.location = 'navMobile.html'
+    }
+
+    function isMobileUserAgent() {
+        return /iphone|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(
+            window.navigator.userAgent.toLowerCase("")
+        );
+    }
     setHeader()
     setFooter()
     function setHeader(){
@@ -34,6 +43,8 @@
     function setFooter(){
         $("#footer").load("https://www.cqna.gov.cn/ggbf_search/ggyr/2022foot/foot.html")
     }
+
+
 </script>
 
 </html>