zoukankan      html  css  js  c++  java
  • 腾讯的手机屏幕的适配代码

    腾讯的适配代码 ,比较权威 ,果断盗用!

    <script type="text/javascript"> 
    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|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){
                    window.location.href="http://shipei.qq.com/index.htm";
                }else if(/iPad/i.test(navigator.userAgent)){
                }else{
                    window.location.href="http://shipei.qq.com/simple/s/index/"
                }
            }catch(e){}
        }
    }
    </script>
  • 相关阅读:
    函数式编程
    高级特性
    ZooKeeper介绍
    perl 退出函数问题
    perl 处理 回车 换行符
    定义函数
    调用函数
    python 字典
    python 条件判断
    列表和数组
  • 原文地址:https://www.cnblogs.com/mjorcen/p/3782464.html
Copyright © 2011-2022 走看看