var request=new XMLHttpRequest();
request.open("GET","get.php",true);
request.send();
request.onreadystatechange=function(){
if(request.readyState===4&&request.status===200){
//做一些事情 request.responseText
}
}
request.open("GET","get.php",true);
request.send();
request.onreadystatechange=function(){
if(request.readyState===4&&request.status===200){
//做一些事情 request.responseText
}
}
2016-01-13
最新回答 / ruibin
后台可以设置显示返回头的信息。前端获取响应头部只有这么一个种函数,getallresponseheader()活着getresponseheader()。现在国内国外很多网站都有类似的设置:如www.googleapis.com。你也可以参考这篇文章:http://www.codeproject.com/Articles/790220/Accurate-time-in-JavaScript
2016-01-13