下面的具体作用是什么:
$.ajax({
type: "POST",
async: false,
对比
$.ajax({
type: "POST",
async: true,
这意味着行为有什么不同?
最佳答案
来自the jQuery site :
By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active.
这就是全部内容了。如果您需要特定问题的帮助,请告诉我。
关于jquery - AJAX .post 异步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10802156/