<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>手机APP下载页面</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta content="telephone=no" name="format-detection" />
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,initial-scale=1" />
<script type="text/javascript">
function is_weixn(){
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i)=="micromessenger") {
return true;
} else {
return false;
}
}
if (!is_weixn()){
// 获取终端的相关信息
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
};
}(),
language : (navigator.browserLanguage || navigator.language).toLowerCase()
}
// 根据不同的终端,跳转到不同的地址
var theUrl = 'http://www.163.cn';
var apps='http://www.163.cn/p.php';
if(Terminal.platform.android){
theUrl = 'http://www.163.cn/123.apk';
}else if(Terminal.platform.iPhone){
theUrl = apps;
}else if(Terminal.platform.iPad){
// 还可以通过language,区分开多国语言版
switch(Terminal.language){
case 'en-us':
theUrl = apps;
break;
case 'ko-kr':
theUrl = apps;
break;
case 'ja-jp':
theUrl = apps;
break;
default:
theUrl = apps;
}
}
location.href = theUrl;
}
</script>
</head>
<body bgcolor="#dc4f03">
<center> 微信看到的内容
<img src="images/wx2.gif" border="0" usemap="#Map">
<map name="Map">
<area shape="rect" coords="75,359,233,395" href="http://www.163.cn">
</map>
</center>
</body>
</html>
------------------------------------------------------------------
p.php
<?php
//重定向浏览器
header("Location:https://itunes.apple.com/cn/app/id961528538?mt=8");
exit;
?>