- (function($){
-
- var _ajax=$.ajax;
-
-
- $.ajax=function(opt){
-
- var fn = {
- error:function(XMLHttpRequest, textStatus, errorThrown){},
- success:function(data, textStatus){}
- }
- if(opt.error){
- fn.error=opt.error;
- }
- if(opt.success){
- fn.success=opt.success;
- }
-
-
- var _opt = $.extend(opt,{
- error:function(XMLHttpRequest, textStatus, errorThrown){
-
-
- fn.error(XMLHttpRequest, textStatus, errorThrown);
- },
- success:function(data, textStatus){
-
-
- fn.success(data, textStatus);
- }
- });
- _ajax(_opt);
- };
posted @
2013-05-09 10:33
若 ♂ 只如初见
阅读(
488)
评论()
编辑
收藏
举报