JavaSciprt带Jquery库 的Post 大概如下, 如果是Get请求是
http://122.227.***.***?id=idValue
对于服务器来说,两种方法(Post和Get)发送的请求收到的数据是一样的。
function sendPost() {
$.ajax({
type: "POST",
cache: false,
url: "122.227.***.***",
data: { id: "idValue" },
dataType: "json",
success: function (result) {
var r = result;
},
error: function (xhr, status, errorMessage) {
console.log(xhr);
}
});
}