自适应浏览器跳转代码

<script>
 var pc_style = ""
 var browser = {
 versions: function () {
 var u = navigator.userAgent, app = navigator.appVersion;
 return {
 trident: u.indexOf('Trident') > -1,
 presto: u.indexOf('Presto') > -1,
 webKit: u.indexOf('AppleWebKit') > -1,
 gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,
 mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/) && u.indexOf('QIHU') && u.indexOf('Chrome') < 0,
 ios: !!u.match(/(i[^;]+;( U;)? CPU.+Mac OS X/),
 android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1,
 iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1,
 iPad: u.indexOf('iPad') > -1,
 webApp: u.indexOf('Safari') == -1,
 ua: u
 };
 }(),
 language: (navigator.browserLanguage || navigator.language).toLowerCase()
 }
 if (browser.versions.mobile && !browser.versions.iPad) {
 this.location = "http://kywm.mz0873.com/index.php?g=Wap&m=Index&a=index&token=znzkxr1404484991&wecha_id={wechat_id}";
 }
</script>

喜欢()
热门搜索
302 文章
16 评论
53 喜欢
Top