jQuery.handleError is not a function 原因是,经测试handlerError只在jquery-1.4.2之前的版本中存在,jquery-1.6 和1.7中都没有这个函数了,因此在1.4.2中将这个函数复制到了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] );
}
},
本文探讨了在使用jQuery过程中遇到的handleError未定义错误的原因,并提供了修复方案。该问题出现在从1.4.2版本升级后,由于新版本移除了此函数导致。通过将旧版中的handleError函数移植到当前项目文件中可以解决此问题。
859

被折叠的 条评论
为什么被折叠?



