验证中...
Languages: HTML
Categories: 常用工具包
Latest update 2019-09-11 18:00
安卓ios二维码二合一
Raw Copy
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>简听 - 随时随地,想听就听</title>
<script type="text/javascript">
// 获取终端的相关信息
var Terminal = {
// 辨别移动终端类型
platform : function(){
var u = navigator.userAgent, app = navigator.appVersion;
return {
// android终端或者uc浏览器
android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
// 是否为iPhone或者QQHD浏览器
iPhone: u.indexOf('iPhone') > -1 ,
// 是否iPad
iPad: u.indexOf('iPad') > -1
};
}(),
// 辨别移动终端的语言:zh-cn、en-us、ko-kr、ja-jp...
language : (navigator.browserLanguage || navigator.language).toLowerCase()
}
// 根据不同的终端,跳转到不同的地址
var theUrl = 'https://itunes.apple.com/app/id1299542018';
if(Terminal.platform.android){//安卓端
document.write('抱歉,“简听 - 随时随地,想听就听”暂时没有安卓版APP!');
//theUrl = 'https://itunes.apple.com/app/id1299542018';
//location.href = theUrl;
} else {
if(Terminal.platform.iPhone){//iPhone端
theUrl = 'https://itunes.apple.com/app/id1299542018';
}else if(Terminal.platform.iPad){//iPad端
// 还可以通过language,区分开多国语言版
switch(Terminal.language){
case 'en-us'://iPad英文版APP Store地址
theUrl = 'https://itunes.apple.com/app/id1299542018';
break;
case 'ko-kr'://iPad韩语版APP Store地址
theUrl = 'https://itunes.apple.com/app/id1299542018';
break;
case 'ja-jp'://iPad日文版APP Store地址
theUrl = 'https://itunes.apple.com/app/id1299542018';
break;
default://iPad默认APP Store地址
theUrl = 'https://itunes.apple.com/app/id1299542018';
}
}
location.href = theUrl;
}
</script>
</head>
<body>
<!--
-->
</body>
</html>

Comment list( 0 )

You need to Sign in for post a comment

Help Search