Uncaught TypeError: Cannot read property 'msie' of undefined问题解决方案
来源:互联网 发布:flash软件的利弊 编辑:程序博客网 时间:2024/05/16 02:22
我在替换UI的时候出现了不知道为什么音频播放不能使用了,通过调试发现报了Uncaught TypeError: Cannot read property 'msie' of undefined这个错误。
原因是因为Jquery插件版本9以后的browser属性已经被移除。
解决方案:
1、引入Jquery9以下的一个版本,我之前是这么解决的,可是之后不知道为什么又不行了,可能是引入了其他js文件导致的,但是js文件逐个注释掉只剩下需要用的那一个也不行,不知道什么原因
2、因为第一种方案找不到问题所在,就通过另外一种解决方式:$.browser.msie =/msie/.test(navigator.userAgent.toLowerCase()) 等号左边是jquery 9以下版本兼容的书写方式,右边是从上向下兼容的书写形式,然后到用到的js文件中找到$.browser.msie 替换成 /msie/.test(navigator.userAgent.toLowerCase()) 就行了
0 1
- 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
- 文件数据如何实现定期自动备份
- Qt一步一步实现插件调用(附源码)、Qt一步一步实现插件通信(附源码)
- STARTUP.A51详解
- android缓存数据到本地放在哪儿最好?
- ACM-快速排序
- Uncaught TypeError: Cannot read property 'msie' of undefined问题解决方案
- 58同城陈小华:互联网新浪潮就是O2O
- Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException
- 23岁的一些迷惘
- 《C++ primer 5》 chapter 1.5 1.6
- PHP网页中嵌入天气
- 【POJ】3659 Cell Phone Network 树上的极小支配集——树型DP
- [Android]API包、目录结构、AndroidManifest.xml
- C语言复习总结