参考 [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 加载之后,再放入下面的代码,如:

 <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script type="text/javascript">
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;}})();
</script>

[转载][jQuery] Cannot read property ‘msie’ of undefined错误的解决方法的更多相关文章

  1. [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法 --转

    初用Yii的srbac模块.出现 Cannot read property ‘msie’ of undefined 错误.上网查询,找到如下的文章.使用文末的打补丁的方法,成功搞定.感谢. ===== ...

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

    最近把一个项目的jQuery升级到最新版,发现有些页面报错Cannot read property ‘msie’ of undefined.上jQuery网站上搜了一下,原因是$.browser这个a ...

  3. jquery升级到新版本报错[jQuery] Cannot read property ‘msie’ of undefined错误的解决方法(转)

    最近把一个项目的jQuery升级到最新版,发现有些页面报错Cannot read property 'msie' of undefined.上jQuery网站上搜了一下,原因是$.browser这个a ...

  4. [jQuery1.9]Cannot read property ‘msie’ of undefined错误的解决方法

    原文:[jQuery1.9]Cannot read property 'msie' of undefined错误的解决方法 $.browser在jQuery1.9里被删除了,所以项目的js代码里用到$ ...

  5. Cannot read property ‘msie’ of undefined错误原因以及解决方案

    最近把一个项目的jQuery升级到最新版,发现有些页面报错Cannot read property ‘msie’ of undefined.上jQuery网站上搜了一下,$.browser这个api从 ...

  6. 关于百度地图(离线)使用过程报“Cannot read property 'jb' of undefined ”错误的解决办法

    使用百度地图(离线)API时,地图无法显示,f12查看报错: BaiduApi_2.0.js:1056 Uncaught TypeError: Cannot read property 'jb' of ...

  7. jquery错误: Cannot read property ‘msie’ of undefined

    背景 Web application, 引用了jquery 1.10.2和fancybox 1.3.4 现象 访问页面遭遇Cannot read property ‘msie’ of undefine ...

  8. 获取判断IE版本 TypeError: Cannot read property 'msie' of undefined

    注意:以下方法只适用于IE11 以下: TypeError: Cannot read property 'msie' of undefined jquery1.9去掉了 $.browser  所以报错 ...

  9. Uncaught TypeError: Cannot read property 'msie' of undefined

    因为图方便,抄了别人写的一个jquerry插件,运行时“var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ...

随机推荐

  1. HDU 1029 Ignatius and the Princess IV DP

    kuangbin 专题 这题,有很多种解法. 第一种: 直接比较每个数出现次数. #include<iostream> #include<string> #include< ...

  2. 字符串旋转(str.find()---KMP)

    此题旋转带有技巧性,问题转化为常见的问题,熟练STL可以直接用str.find()函数,其是主要想用KMP算法实现字符串的查找算法... //如果对于一个字符串A,将A的前面任意一部分挪到后边去形成的 ...

  3. OpenCV在Debug和Release两种模式下布恩那个同时运行的问题

    首先,可以肯定的说,两者是可以随时切换进行运行的,若不能运行,必定是配置出了问题 以Debugx64和Releasex64为例: 在Releasex64模式下,我配置好了各种路径: 于是乎,我切换到D ...

  4. OpenCV中的常用函数

    1.cvLoadImage:将图像文件加载至内存: 2.cvNamedWindow:在屏幕上创建一个窗口: 3.cvShowImage:在一个已创建好的窗口中显示图像: 4.cvWaitKey:使程序 ...

  5. JDBC注册驱动的三种方式

    JDBC注册驱动的三种方式 1.通过导入的JDBC的驱动包拿到的com.mysql.jdbc.Driver对象,利用java.sql.DriverManager对象的DriverManager.reg ...

  6. leetcode@ [49] Group Anagrams (Hashtable)

    https://leetcode.com/problems/anagrams/ Given an array of strings, group anagrams together. For exam ...

  7. MAC OS安装wget

    MAC下没有wget工具,不习惯curl,使用起来还是很不方便的.下载了一个wget源码吧,编译安装.sudo curl -O http://ftp.gnu.org/gnu/wget/wget-1.1 ...

  8. Oracle-查看oracle是否有表被锁

    问题现象: 查看oracle是否有表被锁 解决方法: select sid,serial#,program,terminal,username,b.object_id,c.object_name  f ...

  9. 第十一章、认识与学习 BASH 管线命令 (pipe)

    管线命令使用『 | 』界定符号 [root@www ~]# ls -al /etc | less 管线命令『 | 』仅能处理经由前面一个命令传来的正确信息,也就是 standard output 的信 ...

  10. light oj 1138 - Trailing Zeroes (III)【规律&&二分】

    1138 - Trailing Zeroes (III)   PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit:  ...