ajaxFileUpload 报这错jQuery.handleError is not a function
2016-07-18 19:22
453 查看
jQuery-1.4.2之前的版本才有handlerError方法,之后就不存在了,(你存在,我深深的脑海里。。。),为了能够继续使用ajaxfileupload上传我们的附件,只好将代码拷进我们的项目中的ajaxfileupload.js文件中,如下:
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] );
}
} 这样,就可以用了
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] );
}
} 这样,就可以用了
相关文章推荐
- jQuery
- jquery validate 比较两个input输入框的值的大小
- jQuery——遍历
- jquery.cookie插件的方法使用注意点
- JQueryUi模糊搜索
- 使用jquery获取radio的值
- jquery ajax自动生成表格table基础
- jQuery 实现下拉导航 二级导航
- jQuery某网站品牌列表效果
- jQuery实现滚动公告练习
- jquery倒计时过几秒页面跳转 js倒计时
- jQuery实现仿微博发布框字数提示
- jQuery自制提示框tooltip
- jQuery的deferred对象详解
- jQuery实现表格的查看修改删除
- jquery 经常用到的并且需要注意的地方。
- jquery $.each 用法
- 使用jQuery的插件qrcode生成二维码(静态+动态生成)及常见问题解决方法
- jquery实现倒计时60秒发送邮件
- JQuery 常用命令总结