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

Line 117: Line 117:
 
         }
 
         }
 
</style>
 
</style>
 +
<script>
 +
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()){
 +
    document.body.addEventListener('touchstart', function(){ });
 +
              };
 +
document.body.addEventListener('touchstart', function(){ });
 +
</script>
 
<meta charset="utf-8">
 
<meta charset="utf-8">
 
<meta http-equiv="X-UA-Compatible" content="IE=edge">
 
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Line 263: Line 279:
 
});
 
});
 
</script>
 
</script>
<script>
 
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()){
 
    document.body.addEventListener('touchstart', function(){ });
 
              };
 
</script>
 
  
 
</body>
 
</body>
 
</html>
 
</html>

Revision as of 08:57, 20 October 2019

description