jquery file upload报错:Uncaught TypeError: Cannot call method 'unshift' of undefined
来源:互联网 发布:西北师大知行学院萧泰 编辑:程序博客网 时间:2024/05/22 12:13
本周用jquery file upload这个插件做一个上传文件的功能,打开页面的时候浏览器控制台报错:
Uncaught TypeError: Cannot call method 'unshift' of undefined
而且连报3个同样的,分别来自:
jquery.fileupload-image.js
jquery.fileupload-audio.js
jquery.fileupload-video.js
并且jquery.fileupload-validate.js也报了一个错:
Uncaught TypeError: Cannot call method 'push' of undefined
百度了一下,基本没有相关的信息。没办法,翻墙用谷歌,答案立马找到了:
从这个老外的回答来看,似乎是process插件没有放在image/video/audio插件的前面导致的无法调用相关内容的问题。于是调整一下引用的顺序,
<script type="text/javascript" src="js/lib/jquery/jquery.fileupload-process.js"></script><script type="text/javascript" src="js/lib/jquery/jquery.fileupload-image.js"></script><script type="text/javascript" src="js/lib/jquery/jquery.fileupload-audio.js"></script><script type="text/javascript" src="js/lib/jquery/jquery.fileupload-video.js"></script><script type="text/javascript" src="js/lib/jquery/jquery.fileupload-validate.js"></script>
把jquery.fileupload-procss.js放在前面引用。
不报错了,OK。
jquery.fileupload-image.js
jquery.fileupload-image.js
0 0
- jquery file upload报错:Uncaught TypeError: Cannot call method 'unshift' of undefined
- jquery file upload报错:Cannot call method 'parseMetaData' of undefined
- Uncaught TypeError: Cannot call method 'substring' of undefined
- Extjs4---Uncaught TypeError: Cannot call method 'apply' of undefined
- Extjs4---Uncaught TypeError: Cannot call method 'substring' of undefined
- Extjs4---Uncaught TypeError: Cannot call method 'hasOwnProperty' of undefined
- Uncaught TypeError: Cannot call method 'substring' of undefined
- Uncaught TypeError: Cannot call method 'replace' of undefined 的解决
- Uncaught TypeError: Cannot call method 'substring' of undefined
- Extjs4---Uncaught TypeError: Cannot call method 'hasOwnProperty' of undefined
- JsBridge "Uncaught TypeError: Cannot call method 'callHandler' of undefined", source
- 解答为什么Extjs5中mask.show()不工作了并报错Uncaught TypeError: Cannot call property 'mask' of undefined
- android webView 图片加载不出来 后台报错Uncaught TypeError: Cannot call method 'getElementsByTagName' of null
- Uncaught TypeError: Cannot read property 'call' of undefined jquery.validate.min.js:28
- js的form(load报错jquery.easyui.min.js:2837 Uncaught TypeError: Cannot read property 'tip' of undefined
- jquery file upload 报错:Cannot read property 'nodeName' of undefined
- jquery file upload 报错:Cannot read property 'fileupload' of undefined
- jquery file upload报错:Cannot read property 'parseMetaData' of undefined
- 数据库索引的优缺点分析
- 引用和指针的联系和区别
- HDOJ 4891 The Great Pan(读入优化)
- 单例模式(JAVA)
- hdu 4619 Warm up 2 (二分图)
- jquery file upload报错:Uncaught TypeError: Cannot call method 'unshift' of undefined
- python 获取命令行参数
- 判断拼写串@str中是否含有ABC怎么写SQL
- MapReduct例子
- Palindromes _easy version回文(2029)
- hdu-oj 2123 An easy problem
- 安卓手机误删照片怎么恢复
- NIOS II 处理器性能测试
- leetcode Reorder List