zoukankan      html  css  js  c++  java
  • [转载][jQuery] Cannot read property ‘msie’ of undefined错误的解决方法

    参考 [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法

    ---------------------------------------------邪恶的分割线哇--------------------------------------------------------------

    可以使用两个方法:

    1. 使用 jQuery Migrate插件

    <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
    <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>

    2. 不使用插件,实现$.browser方法

    在jQuery 加载之后,再放入下面的代码,如:

    1 <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
    2 <script type="text/javascript">
    3     jQuery.browser={};(function(){jQuery.browser.msie=false; jQuery.browser.version=0;if(navigator.userAgent.match(/MSIE ([0-9]+)./)){ jQuery.browser.msie=true;jQuery.browser.version=RegExp.$1;}})();
    4 </script>
  • 相关阅读:
    Intern Day42
    Intern Day42
    Intern Day42
    Intern Day40
    腾讯PC客户端二面
    面试
    面试
    面试
    计算机网络
    计算机网络
  • 原文地址:https://www.cnblogs.com/fsong/p/5108996.html
Copyright © 2011-2022 走看看