Difference between revisions of "Template:UESTC-China/nav"

Line 273: Line 273:
 
           return flag;   
 
           return flag;   
 
       }
 
       }
function IsPC(){ 
+
 
          var userAgentInfo = navigator.userAgent; 
+
          var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"); 
+
          var flag = true; 
+
          for (var v = 0; v < Agents.length; v++) { 
+
              if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; } 
+
          } 
+
          return flag; 
+
      }
+
 
if(!IsPC()){
 
if(!IsPC()){
 
    document.body.addEventListener('touchstart', function(){ });
 
    document.body.addEventListener('touchstart', function(){ });
 
               };
 
               };
}
 
}
 
 
</script>
 
</script>
  
 
</body>
 
</body>
 
</html>
 
</html>

Revision as of 08:49, 20 October 2019

description