我见过的一些代码指定了async:true
,而其他代码则指定了async:false
。如果我根本不声明 async
,它是否默认为 true
,因此 ajax 调用默认是异步的?
最佳答案
查看 the documentation of jQuery.ajax
(引用):
By default, all requests are sent asynchronously (i.e. this is set to
true
by default). If you need synchronous requests, set this option tofalse
.
关于jquery - 在.ajax调用中,是异步的: true assumed by default?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5129120/