📅  最后修改于: 2022-03-11 15:03:50.087000             🧑  作者: Mango
var url = "https://example.com/";
var xhr = new XMLHttpRequest();
xhr.open("GET", url);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
console.log(xhr.status);
console.log(xhr.responseText);
}};
xhr.send();