var xhr = new XMLHttpRequest();
xhr.open("GET",url,false);
xhr.onreadstatechange = function() {
if (xhr.readystate === 4){
if(xhr.status === 200){
alert(xhr.responseText);
}
}
}
xhr.send(null);
手写ajax的实现过程
最新推荐文章于 2022-10-16 20:17:39 发布