浏览器cannot read property 'msie' of undefined的解决方法
来源:互联网 发布:正交矩阵和实对称矩阵 编辑:程序博客网 时间:2024/06/02 14:15
想起以前看到的一个笑话:一个悬崖边上立着个”Warnning”的牌子,悬崖下躺满了程序员。
对于Warnning如果要求不高通常可以忽略,对于浏览器报错真的要注意一下了,否则程序运行不起来啊→_→
练习demo的时候无论怎么选择js版本还是简化文档内容都无法达到预期效果,于是调用”F12”大法,好吧,看到这么一个错误:
Uncaught TypeError: Cannot read property 'msie' of undefined
谷歌之:
jQuery.browser() removed
The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr.
意思就是jQuery.browser()在后版本不支持了,需要引入一个js插件来进行兼容处理;好吧,在引入一个js文件就可以了:
下载地址:
jquery-migrate-1.3.0.js
下载这个js文件,然后放在jquery文件下面:
<script src="jquery-2.1.4.js"></script> <script src="jquery-migrate-1.3.0.js"></script>
然后浏览器的”Error”变成了”Warnning”,哼!程序员怎么会在意这个呢,能运行就OK了。
(后话,将来的某一天我就躺在了”Warnning”悬崖下 TnT )
0 0
- 浏览器cannot read property 'msie' of undefined的解决方法
- 浏览器cannot read property 'msie' of undefined的解决方法
- [jQuery]Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
- [JQUERY] CANNOT READ PROPERTY ‘MSIE’ OF UNDEFINED错误的解决方法
- [Jquery]Cannot read property 'msie' of undefined
- Cannot read property ‘msie’ of undefined
- Cannot read property ‘msie’ of undefined
- [jQuery1.9]Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery1.9]Cannot read property ‘msie’ of undefined错误的解决方法
- [jQuery1.9]Cannot read property ‘msie’ of undefined错误的解决方法
- Uncaught TypeError: Cannot read property 'msie' of undefined问题解决方案
- Jquery错误:Cannot read property ‘msie’ of undefined
- Uncaught TypeError: Cannot read property 'msie' of undefined
- 银行家算法
- JAVA中的Object类
- Minecraft题解
- 个人笔记 html 06 获取验证码之后倒计时功能
- 内联函数详解(未完成)
- 浏览器cannot read property 'msie' of undefined的解决方法
- [LeetCode]159. Longest Substring with At Most Two Distinct Characters
- 图解正向代理、反向代理、透明代理
- 蓝桥杯 历届试题 蚂蚁感冒 (模拟)
- [LeetCode]160. Intersection of Two Linked Lists
- HDU 1004 Let the Balloon Rise(map)
- 短作业优先与时间片轮转法
- 一次失败的j2v8集成
- Tuple and Tie