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>

      

  • 相关阅读:
    正则表达式
    浏览器加载时间线
    浏览器事件
    脚本化CSS
    定时器元素大小位置属性等 20181231
    关于行内元素 20181229
    个人冲刺01
    周总结
    团队冲刺10
    团队冲刺09
  • 原文地址:https://www.cnblogs.com/aimyfly/p/4588941.html
Copyright © 2011-2022 走看看