浏览器cannot read property 'msie' of undefined的解决方法
来源:互联网 发布:算法导论英文版 百度云 编辑:程序博客网 时间:2024/06/05 05:24
练习demo,版本升级很容易有错误…,百度和Google
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>
原文链接
如以上无效,请参考以下链接:
Uncaught TypeError: Cannot read property ‘msie’ of undefined - jQuery tools
//在代码中加上<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>
阅读全文
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
- 13-javascript map/reduce
- Android Api demo系列(24) (Graphics>RoundRects(讲解的是GradientDrawable的使用))
- 性格分析工具
- vue安装及创建项目
- oracle 的csv 导入到mongodb 部分字段会转换成int numberlong 修改方式
- 浏览器cannot read property 'msie' of undefined的解决方法
- Java面试题全集(上)
- JPA访问mysql时候出现了某个字段与数据库关键字重复
- vue嵌套路由
- leetcode 476. Number Complement(C语言)
- C++实现给多个变量传值
- JS ajax获取值使单选框选中
- Linux下c实现域名转IP的方法封装
- iOS开发之swift资料大全