zoukankan      html  css  js  c++  java
  • 判断浏览器类型和版本

    //判断浏览器类型和版本

    ie8及以下不能使用jquery2.0以上版本库,可采用以下方法判断

    <!--[if lte IE 8]>
    <script type="text/javascript">
    alert('Warm tip: dear friend, your browser version is too low will affect your normal use of the system, please upgrade to the latest version of the browser and then browse, the system supports the following version of the browser:★ IE 9+ ★ Firefox 5+ ★ Chrome 14+ ★ Safari 5+ ★ Opera 11+');
    </script>

          <script type="text/javascript"> 
             var Sys = {}; var ua = navigator.userAgent.toLowerCase(); var s; (s = ua.match(/msie ([d.]+)/)) ? Sys.ie = s[1] : (s = ua.match(/firefox/([d.]+)/)) ? Sys.firefox = s[1] : (s = ua.match(/chrome/([d.]+)/)) ? Sys.chrome = s[1] : (s = ua.match(/opera.([d.]+)/)) ? Sys.opera = s[1] : (s = ua.match(/version/([d.]+).*safari/)) ? Sys.safari = s[1] : 0 if ( Sys.firefox < '5.0' || Sys.chrome < '14.0' || Sys.safari < '5.0' || Sys.opera < '11.0') { alert('Warm tip: dear friend, your browser version is too low will affect your normal use of the system, please upgrade to the latest version of the browser and then browse, the system supports the following version of the browser:★ IE 9+ ★ Firefox 5+ ★ Chrome 14+ ★ Safari 5+ ★ Opera 11+'); }//./
    </script>

      

  • 相关阅读:
    Item2:建造者替代多参数构造器
    Java常量赋值失败?
    0828 列表 增删改查
    字符 列表的切片规则
    0820 字符转换为数字
    使用 in 判断是否有敏感词
    while循环
    for循环
    isalnum 判断变量是否由字符或者数字组成
    使用lower upper等字符大小写指令选择为大小写单词转换大小写
  • 原文地址:https://www.cnblogs.com/aimyfly/p/4588941.html
Copyright © 2011-2022 走看看