var xhr = new XMLHttpRequest();
xhr.open('get','xx.xx',false);
xhr.onreadyStateChange = function(){
if(xhr.status == 200 && xhr.readyState == 4) {
console.log('finish');
}
}
xhr.send(null);
console.log('test');
是卡在send之后吗?也就是finish出来之后才出来test