A quick introduction to Ajax:
Simply put, an Ajax request sends a request through an XMLHttpRequest object, which has four states (readyStates) :
0- uninitialized, 1- initializing, 2- sending data, 3- sending data, 4- done.
When XMLHttpRequest. ReadyState is 4, said ajax request has been completed can get the result.
Ajax’s success and Error methods are triggered based on the response status code. Success () is triggered when XMLHttprequest.status is 200, indicating a successful response. Other status codes trigger error().
In addition to the response status code, Ajax can also use an error method in the following situations:
- return data type is not JSON network interrupt background response interrupt
Read More:
- In the HTML page request Ajax times 400 error, solve Yii submit post form 400 error, and Ajax post request 400 problem (example code)
- Centos-7 set boot to enter the text interface (not enter the graphical interface)
- Ajax error reporting cross domain, AJAX cross domain access error 501 solution
- Django + jQuery get data in the form + Ajax send data
- Encapsulation of Ajax JSON / fromdata request in native JS
- Ajax can’t download file to browser
- Pytorch RuntimeError CuDNN error CUDNN_STATUS_SUCCESS (How to Fix)
- ajax error 400 (Failed to load resource: the server responded with a status of 400 (Bad Request))
- JS Ajax request is successful, the response displays “failed to load response data”
- ASP.NET AJAX client-side framework failed to load
- Remember once to solve the problem that Ubuntu 18.04 can’t enter GUI
- The problem of flash back by pressing enter window when debugging or executing program in Visual Studio C
- Why can’t Scala shell enter Q to exit
- How to solve the problem of “please enter a commit message to explain why this merge is necessary” when git merges branches?
- An Ajax HTTP error occurred in drupal7 installation occurred.HTTP Result Code
- Git still needs to enter the user name and password after configuring the public key
- After canceling the startup of Ubuntu terminal, it will automatically enter the base environment of CONDA
- HTML method IE8 reports an error, IE8 jQuery Ajax obtains static resources reports an error, typeerror denies access
- From the tensorboard command line, enter tensorboard — logdir$$