标签:
Jquery ajax 异步、同步加载
//1.异步
common.AjaxPost = function (url, param,success) {
$.ajax({
type: "POST",
traditional:true,
url: url,
dataType: "json",
data: param,
async: true,
success: success,
error: error
});
}
//2.同步
common.AjaxPostAsync = function (url, param, success) {
$.ajax({
type: "POST",
traditional: true,
url: url,
dataType: "json",
data: param,
async: false,
success: success,
error: error
});
}
标签:
原文地址:http://www.cnblogs.com/mengmeng-bin/p/4607803.html