$.ajax({
type: "get", //post或者get
url: web_url,
data: "id=1&user=username", //提交的数据或参数
dataType: "text",
contentType: "application/x-www-form-urlencoded; charset=utf-8",
//async: false, //是否异步
success: function (data) {
//data返回结果
},
});
type: "get", //post或者get
url: web_url,
data: "id=1&user=username", //提交的数据或参数
dataType: "text",
contentType: "application/x-www-form-urlencoded; charset=utf-8",
//async: false, //是否异步
success: function (data) {
//data返回结果
},
error: function (msg) {
//错误处理
alert(msg);
}});