跳转代码

   <script>
var mobileUrl = 'https://www.baidu.com';
var mobileAgent = new Array("iphone", "ipod", "ipad", "android", "mobile", "blackberry", "webos", "incognito", "webmate", "bada", "nokia", "lg", "ucweb", "skyfire");
var browser = navigator.userAgent.toLowerCase(); 
var isMobile = false; 
for (var i=0; i<mobileAgent.length; i++){
    if (browser.indexOf(mobileAgent[i])!=-1){ 
        isMobile = true; 
        break;
    }
}
if(isMobile){

    location.href = mobileUrl;
}
</script>
文章由官网发布,如若转载,请注明出处:https://www.23ziyi.com/21
336

发表评论