<html><head><meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="format-detection" content="telephone=no">
<title> </title>
<script type="text/javascript">
function getDevice(){
var sUserAgent= navigator.userAgent.toLowerCase();
var bIsIpad= sUserAgent.match(/ipad/i) == "ipad";
var bIsIphoneOs= sUserAgent.match(/iphone/i) == "iphone";
var bIsMidp= sUserAgent.match(/midp/i) == "midp";
var bIsUc7= sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
var bIsUc= sUserAgent.match(/ucweb/i) == "ucweb";
var bIsAndroid= sUserAgent.match(/android/i) == "android";
var bIsCE= sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM= sUserAgent.match(/windows mobile/i) == "windows mobile";
if(bIsAndroid){
return "android";
}
else if(bIsIpad||bIsIphoneOs){
return "ios";
}
else return "pc"
}
(function(){
var device = getDevice();
var ios = 'https://itunes.apple.com/cn/app/gan-guan-shi-jie/id1116324285?mt=8',
android = 'http://app.qq.com/#id=detail&appid=1105324814';
if(device=="android"){
window.location.href=android;
}
else if(device=="ios"){
window.location.href=ios;
}else{
//window.location.href="";
}
})();
</script>
</head>
<body>
</body></html>
web识别运行终端类型
最新推荐文章于 2022-04-20 14:29:07 发布