jquery - 在.ajax调用中,是异步的: true assumed by default?

标签 jquery ajax

我见过的一些代码指定了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 to false.

关于jquery - 在.ajax调用中,是异步的: true assumed by default?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5129120/

相关文章:

java - 使用 SQL 数据库中的值过滤 JSP 上的表值

javascript - 将 .json 文件中的项目分配给 javascript 中的变量

javascript - 使用 javascript 和 ajax 将多个对象发送到 php

jquery - 使用JQuery函数减少重复代码

javascript - 关于按键 = 在文本字段中输入

javascript - 使用 js/jQuery 检查对象(不是元素)是否真的存在

javascript - 如何从服务器端在模态 Bootstrap 中进行验证?

javascript - Marionette 中有 onBlur nanlog 吗?

javascript - 如何根据屏幕尺寸(重新)使用不同的选项初始化工具提示?

jQuery ajax POST 导致立即 GET 到同一 URL