ajaxFileUpload报错jQuery.handleError is not a function
来源:互联网 发布:地下室防水算法 编辑:程序博客网 时间:2024/05/17 08:55
转自 : http://blog.csdn.net/lglglgl/article/details/52794746
第一次使用ajaxFileUpload,据说,当年使用的jQuery还是1.9,好多年没更新了,而我。。。第一次使用jQuery就4.0了。
出现这个错误的原因是ajaxfileupload内部少了handleError方法,这个方法应该是jQuery版本里面的。So,copy一份过来ajaxfileupload.js内。
如下面红色部分是copy进来的,即在ajaxfileupload内如下添加红色部分:
// JavaScript Document
jQuery.extend({
//添加内容↓
handleError : function(s, xhr, status, e) {
// If a local callback was specified, fire it
if (s.error) {
s.error.call(s.context || s, xhr, status, e);
}
// Fire the global callback
if (s.global) {
(s.context ? jQuery(s.context) : jQuery.event).trigger(
"ajaxError", [ xhr, s, e ]);
}
},
//添加内容↑
createUploadIframe :function(id, uri) {
// create frame
var frameId ='jUploadFrame' + id;
if (window.ActiveXObject) {
var io = document.createElement('<iframe id="' + frameId
+'" name="' + frameId + '" />');
if (typeof uri =='boolean') {
io.src ='javascript:false';
}elseif (typeof uri =='string') {
io.src = uri;
}
}else {
var io = document.createElement('iframe');
io.id = frameId;
io.name = frameId;
}
io.style.position ='absolute';
io.style.top ='-1000px';
io.style.left ='-1000px';
document.body.appendChild(io);
return io;
},
参考链接:http://zhangzhaoaaa.iteye.com/blog/2123021
阅读全文
0 0
- ajaxFileUpload报错jQuery.handleError is not a function
- ajaxFileUpload报错jQuery.handleError is not a function
- ajaxfileupload.js的报错:jQuery.handleError is not a function 解决办法
- ajaxfileupload.js结合低版本jquery报异常:TypeError: jQuery.handleError is not a function
- ajaxfileupload.js jQuery.handleError is not a function
- ajaxFileUpload 报这错jQuery.handleError is not a function
- ajaxFileUpload :jQuery.handleError is not a function的解决方法
- ajaxFileUpload 报这错jQuery.handleError is not a function
- 【转载】ajaxFileUpload 报这错jQuery.handleError is not a function
- 引用(ajaxfileupload.js) ajaxfileupload.js报这错jQuery.handleError is not a function
- 引用(ajaxfileupload.js) ajaxfileupload.js报这错jQuery.handleError is not a function
- 引用(ajaxfileupload.js) ajaxfileupload.js报这错jQuery.handleError is not a function
- jquery ajax图片上传 springmvc ajaxFileUpload 报这错jQuery.handleError is not a function
- jQuery.form Ajax无刷新上传报错 (jQuery.handleError is not a function) 解决办法
- jQuery.form Ajax无刷新上传报错 (jQuery.handleError is not a function) 解决办法
- jQuery.handleError is not a function
- 执行ajaxFileUpload发生jQuery.handleError is not a function错误的个人解决方法
- ajaxfileupload.js上传文件时jQuery.handleError is not a function的 解决办法
- PHP调用微信JS-SDK接口上传头像保存到服务器
- 解决eclipse Ctrl +左键查看源代码Source not found的问题
- java hashmap 排序 遍历 嵌套
- Qt的析构机制
- linux shell中 if else以及大于、小于、等于逻辑表达式介绍
- ajaxFileUpload报错jQuery.handleError is not a function
- AJAX 教程
- 两个队列实现栈(stack)
- Android系统system用户权限和root权限的获取
- OpenCV Mat结构关键特性记录
- 简单网络请求+ListView
- windows下ruby安装环境配置
- Windows 下安装 express
- Win API 和 MFC 创建的线程中实现设置定时器