<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">"http://www.w3.org/1999/xhtml">"Content-type"Content="text/html; Charset=utf-8"/><script src="Jquery-3.1.1.min.js"></script><title> Untitled document </title>"Text/javascript">$.ajax ({URL:"1110morningchuli.php",//working with page addressesData:{code:"n001"},//the data passed, the data submittedType"POST",//How to submitDataType:"TEXT",//the type of the return value (there are three types) TEXT POST XML: Extensible Markup Language, usable in, 1, data transfer, used as a data carrierSuccess:function (data) {//callback function, the parameters inside the parentheses are literally named, is actually the return valuealert (data); }, Error:function () {//Handling Error Execution } });</script></body>Asynchronous processing
Ajax calls by default are asynchronous, high efficiency
Asynchronous refers to the transfer of data regardless of whether the other party receives, direct transmission
Synchronization means that when the data is passed, it must be received before the next data can be transmitted.
For Ajax, it's about executing two threads at a time.
Workaround:
1, turn Ajax into a synchronous
2, put the Add event code inside the AJAX callback function
Ajax (20161110)