试试这个:
request = $.ajax({ type: "GET", url: url, data: data, statusCode: { 200: function() { doSomething(); }, 304:function(){ doSomethingElse(); } }});要么:
request = $.ajax({ type: "GET", url: url, data: data, complete: function(e, xhr, settings){ if(e.status === 200){ }else if(e.status === 304){ }else{ } }});


