不能自动跳转到手机页面,联通提示错误,为什么呢?这个是腾讯的代码。

<script type="text/javascript">
if(window.location.toString().indexOf('pref=padindex') != -1){
}else{

if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){  
  if(window.location.href.indexOf("?mobile")<0){
    try{
        if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){
            window.location.href="http://http://www.ccdzjy.com/zt/ly/wap.html";
        }else if(/iPad/i.test(navigator.userAgent)){

        }else{
            window.location.href="http://www.ccdzjy.com/zt/ly/wap.html"
        }
    }catch(e){}
}
}

}
</script>

阅读 2.6k
1 个回答

clipboard.png

这里多了http

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题