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();
});