var url = "/login";
var params = "username=51faddfc7189048f7b8e75f6753ab196&password=1008842b61a946b33ffabebb9ba6e653";
var xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xhr.onload = function (e) {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
console.log(xhr.responseText);
} else {
console.error(xhr.statusText);
}
}
};
xhr.onerror = function (e) {
console.error(xhr.statusText);
};
xhr.send(params);
chrome post data
最新推荐文章于 2024-10-11 03:46:05 发布