1. Status code return 200--indicates that the server responds to the client's request normally;
2. Through the httpwatcher of Firebug and IE, we can see that the server side returns normal data, and it is the data that conforms to the business logic, but the program simply does not enter the callback function success:function (data) {* *} but goes to error: function (data) {* *}.
The problem lies in:
1. Whether each data returned is a data type defined in datatype. If some of the data is not or even if a piece of data is not strictly defined by datatype, the program goes to Error:function () {* *},
You see if response is present CALLBACK,JSONP the request will take callback return should be callback, and the JSON request is not callback. To distinguish between the need to datatype is JSON or JSONP,
The data type that is returned must conform to the defined data type. That is, if the dataType you define is a JSON type, the returned data must be JSON, flat and otherwise the block of error will be executed.
2. Whether the requested domain and the current domain are the same domain, and if not the same domain, it is very likely to enter error:function () {* *}
3. It is also important to pay special attention to whether the JSON data returned is a strict JSON format.
4. It should also be a serious concern that when a list data is returned in the background (the data in the list is in JSON format), there is no dirty data that is not a strict JSON format.
jquery Ajax Request Success also has response, but does not enter success