现在大家至少也在用jquery1.9以上的版本,ajaxfileupload的版本早就不更新了,而handlerError方法是版本1.4.2之前的版本才有,之后就不存在了,(你存在,我深深的脑海里。。。),为了能够继续使用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 );
}
if ( s.global ) {
(s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
}
},
最好将此代码放在ajaxfileupload.js脚本的开头。注意最后大括号后面要添加逗号!!!