在哪个scieno中我需要在Jquery Ajax方法中使用async:false或async:true [英] in which scieno i need to use async: false, or async: true in Jquery Ajax Method
本文介绍了在哪个scieno中我需要在Jquery Ajax方法中使用async:false或async:true的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道我需要在哪里使用async: false, or async: true
Jquery Ajax方法
i am wondering where i need to use async: false, or async: true
Jquery Ajax Method
我有一个带有字段的表单,当我单击按钮时,我正在调用jquery ajax方法将值从此字段保存到服务器
i have one form with fields and when i click on button i am calling jquery ajax method to save value from this fields to server
$.ajax({
url: "../Member/Home.aspx/SaveClient",
type: "POST",
async: false,
dataType: 'json',
contentType: 'application/json; charset=utf-8',
data: "{'projectSoid': '" + $("#hdnValueProjectSoid").val()
+ "', 'name': '" + Name
+ "', 'industry ': '" + Industry
+ "', 'descriptions ': '" + Descriptions
+ "', 'employment ': '" + Employment
+ "', 'email ': '" + Email
+ "', 'phone ': '" + Phone + "'}",
success: function (response) {
if (response.d != null) {
},
推荐答案
异步:您尝试获取的Ajax响应与您正在执行的下一个任务无关.
Async : The ajax response you are trying to get has no dependency on next task you are doing.
同步:您尝试接收的Ajax响应依赖于您正在执行的下一个任务.
Sync: The ajax response you are trying receive has dependency on the next task you are doing.
这篇关于在哪个scieno中我需要在Jquery Ajax方法中使用async:false或async:true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文