我是靠谱客的博主 清脆煎蛋,这篇文章主要介绍js判断设备自动跳转,判断手机端跳转,现在分享给大家,希望可以做个参考。

<script type="text/javascript">

       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;

               //alert(mobileAgent[i]);

               location.href = '填入手机站地址';

               break;

           }

       }

   </script>

最后

以上就是清脆煎蛋最近收集整理的关于js判断设备自动跳转,判断手机端跳转的全部内容,更多相关js判断设备自动跳转内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(145)

评论列表共有 0 条评论

立即
投稿
返回
顶部