在调用一个jquery的ajax方法时我们有时会需要该方法返回一个值或者给某个全局变量赋值,可是我们发现程序执行完后并没有获取到我们想要的值,这时很有可能是因为你用的是ajax的异步调用async:true(默认情况),如: 代码如下:function ManageCommentText(text) {var result = text;$.ajax({data: “get”,url: “GetComments.aspx”,data: “type=getText&commentText=” + text,cache: false,async: false,success: function (