微信APP下載跳轉(支持微信掃一掃)


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>APP下載</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <style>
        .wxtip{background: rgba(0,0,0,0.8); text-align: center; position: fixed; left:0; top: 0; width: 100%; height: 100%; z-index: 998; display: none;}
        .wxtip-icon{width: 52px; height: 67px; background: url(./weixin-tip.png) no-repeat; display: block; position: absolute; right: 20px; top: 20px;}
        .wxtip-txt{margin-top: 107px; color: #fff; font-size: 16px; line-height: 1.5;}
    </style>
</head>
<body>
<div class="wxtip" id="JweixinTip">
    <span class="wxtip-icon"></span>
    <p class="wxtip-txt">點擊右上角<br/>選擇在瀏覽器中打開進行下載安裝</p>
</div>
<script type="text/javascript">
    window.onload = function(){
        if(isWeiXin()){
            var shade = document.getElementById('JweixinTip')
            shade.style.display = 'block'
        }else{
            var UA = navigator.userAgent,devicesType = "android";
            (UA.indexOf("iPhone") > -1 || UA.indexOf("iPad") > -1) && (devicesType = "iPhone");
            if(devicesType === "android"){
                location.href = "安卓下載地址";
            }
            if(devicesType === "iPhone"){
                location.href = "蘋果下載地址";
            }
        }
    }
    function isWeiXin(){
        var ua = window.navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i) == 'micromessenger'){
            return true;
        }else{
            return false;
        }
    }
</script>
</body>
</html>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM