window.onload = function() {
var btn = document.querySelector('.btn');
btn.addEventListener('click', function() {
var xhr = new XMLHttpRequest();
xhr.open("GET","v_index.html", true);
xhr.send();
if(xhr.status != 200) {
document.write(xhr.status + ": " +xhr.statusText );
}else {
document.write(xhr.responseText);
}
});
}
xhr.open("GET","v_index.html", false);