Uncaught TypeError: Cannot read property 'msie' of undefined
来源:互联网 发布:mysql中添加外键约束 编辑:程序博客网 时间:2024/05/16 18:06
1、错误描述
Uncaught TypeError: Cannot read property 'msie' of undefined at Object._show (http://localhost:8080/cmp/js/jquery.hiAlerts-min.js:41:72) at Object.alert (http://localhost:8080/cmp/js/jquery.hiAlerts-min.js:2:317) at hiAlert (http://localhost:8080/cmp/js/jquery.hiAlerts-min.js:84:34) at HTMLButtonElement.<anonymous> (http://localhost:8080/cmp/js/page/index.js:62:4) at HTMLButtonElement.dispatch (http://localhost:8080/cmp/js/jquery-1.11.0.min.js:3:8066) at HTMLButtonElement.r.handle (http://localhost:8080/cmp/js/jquery-1.11.0.min.js:3:4767)
2、错误原因
由于jquery 1.9以及以上版本不支持$.browser.msie和$.browser.version这两个方法,而页面引入的是jquery-1.11.0.min.js,版本比1.9更高,不支持上述两个方法,导致出现这个错误
3、解决办法
将if条件判断
if ( a.browser.msie && parseInt(a.browser.version) <= 6)) { c = c + a(window).scrollTop()}if (a.browser.msie && parseInt(a.browser.version) <= 6)) { b = b - 175}修改为
if ( 'undefined' == typeof(document.body.style.maxHeight)) { c = c + a(window).scrollTop()}if ('undefined' == typeof(document.body.style.maxHeight)) { b = b - 175}
0 0
- Uncaught TypeError: Cannot read property 'msie' of undefined问题解决方案
- Uncaught TypeError: Cannot read property 'msie' of undefined
- Uncaught TypeError: Cannot read property 'msie' of undefined jQuery
- Uncaught TypeError: Cannot read property 'msie' of undefined
- Uncaught TypeError: Cannot read property 'msie' of undefined
- Uncaught TypeError: Cannot read property 'msie' of undefined
- Extjs4---Uncaught TypeError: Cannot read property ‘items’ of undefined
- 【StackFlow】Uncaught TypeError: Cannot read property 'pageCount' of undefined
- Ckeditor: Uncaught TypeError: Cannot read property 'keyCode' of undefined 解决方法
- Uncaught TypeError: Cannot read property 'options' of undefined 错误
- Uncaught TypeError: Cannot read property 'length' of undefined
- 错误:Uncaught TypeError: Cannot read property 'WebSocket' of undefined
- Uncaught TypeError: Cannot read property 'value' of undefined
- Uncaught TypeError: Cannot read property 'plugin' of undefined
- react Uncaught TypeError: Cannot read property 'title' of undefined
- Uncaught TypeError: Cannot read property 'width' of undefined
- Uncaught TypeError: Cannot read property 'substring' of undefined
- Uncaught TypeError: Cannot read property 'PRINT_INIT' of undefined user:100
- Design: Android Design Support Library (二)
- 【学习笔记】《深入PHP - 面向对象、模式与实践》(第3版)——第5章 对象工具
- 静态数码管
- 性能测试1-分类和定义
- busybox下载地址
- Uncaught TypeError: Cannot read property 'msie' of undefined
- Class和Style绑定
- (9)Java多线程之Lock接口
- 深入MNIST code测试
- Android 仿IOS版QQ实现下拉刷新水滴的效果
- map, foreach, for的用法区别
- 算法实现(1):Ford-Fulkerson Algorithm
- 动态数码管
- 杂项记录