carelessness:
$.ajax({
type: 'POST',
async: false,
url: url,
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify(postData),
success: function(result){
if(result.state==1){
//成功
var data = result.data.tableList;
var sumnum = result.data.iSumNum;
grid.setDatasource(data,sumnum);
}else{
cui.error("数据初始化失败");
}
}
});
}
开始的时候没写url导致该错误
div>
Read More:
- Ajax error reporting cross domain, AJAX cross domain access error 501 solution
- Uncaught Error: _registerComponent(…): Target container is not a DOM element
- Error: required request body is missing, @ requestbody annotation usage
- Django + jQuery get data in the form + Ajax send data
- When to enter success and error in AJAX
- Storing JSON data in session storage
- ajax error 400 (Failed to load resource: the server responded with a status of 400 (Bad Request))
- [jQuery] jQuery operates on JSON strings or JSON objects
- Encapsulation of Ajax JSON / fromdata request in native JS
- In the HTML page request Ajax times 400 error, solve Yii submit post form 400 error, and Ajax post request 400 problem (example code)
- Jqgrid loadonce: true cannot continue
- Error: syntax error – unexpected token P in JSON at position 0
- HTTP 400 error – bad request
- Transformation of JS map and JSON
- The problem that headers [‘content-type ‘] does not work is set in the Axios get method request interface
- 209151; org.json.JSONException A JSONObject text must begin with'{‘at character 1 of {
- React Native: TypeError: Network request failed
- The remote server returned an error: (417) Expectation failed
- Four ways to get Django parameters in request
- The back end cannot receive the parameters passed by the front end