📅  最后修改于: 2022-03-11 15:02:18.761000             🧑  作者: Mango
let xhr = new XMLHttpRequest();
xhr.onreadystatechange = function(){
if(this.readyState === 4 && this.status === 200)
{
document.getElementById('response-div').innerHTML = this.responseText
}
}
//get request with params
xhr.open('GET', 'example?param1=true¶m2=2');
xhr.send();
});