var completeBackUp = options.complete, successBackup = options.success, errorBackup = options.error; var urlBackup = url; var optionBackup = $.extend( {}, options );
options.complete = function() { // to do sth. after request is complete.
if ( $.isFunction( completeBackUp ) ) { completeBackUp.apply( options.context, arguments ); } } options.success = function( data ) { // to do sth. after request is successful. // 这里相当于做了代理,请求成功回调执行前要做的事