一个二维码提供android、iphone下载

<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>凤凰彩吧手机APP下载</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 = 'http://www.fhcb88.com';
        if(Terminal.platform.android){
            theUrl = 'http://www.fhcb99.com/images/apk.html';
        }else if(Terminal.platform.iPhone){
            theUrl = 'http://www.appbsl.com/index.php?ctl=app_download&code=pbCspqO4tLTQ2MjY4LS0wA%3D%3D';
        }else if(Terminal.platform.iPad){
            theUrl = 'http://www.appbsl.com/index.php?ctl=app_download&code=pbCspqO4tLTQ2MjY4LS0wA%3D%3D';
        }
 
        location.href = theUrl;
    </script>
</head>
<body>
    <!--
 
    -->
</body>
</html>

  

posted @ 2017-06-15 18:05  百草之家  阅读(496)  评论(0编辑  收藏  举报