This article is a mirror article of machine translation, please click here to jump to the original article.

View: 9611|Reply: 0

[Jquery] Solve ajax not being able to assign values to external variables

[Copy link]
Posted on 9/27/2019 4:23:10 PM | | |
Because Ajax acquires data asynchronously by default, your program continues to execute downwards when executing Ajax, so that your variable is not assigned by the Ajax method.



Set async:false in ajax; That is, synchronization
When async is false, it means that the ajax request is synchronous, then this API defaults to calling the returned result directly through the $.ajax() method to get the value, not through the success callback function, so the success callback function will not be called.








Previous:Please share the PHPDisk Z-Core operation version 6.6 city pass template with 15 advertising slots
Next:The new .NET Core features release a single-file executable
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com