交互模型图简介
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/662af218896e436f8418fb3e7a312234.png)
简单使用示例
function getXMLHttpRequest(){
var xmlHttpRequest;
if(window.XMLHttpRequest){
xmlHttpRequest = new XMLHttpRequest();
}else if(window.ActiveXOject){
xmlHttpRequest = new ActiveXOject("miscrosoft.XMLHTTP");
}else{
alert("当前浏览器版本太低,请升级浏览器版本");
}
return xmlHttpRequest;
}
var xml = getXMLHttpRequest();
xml.onreadystatechange = function(){
console.log(xml.readyStata);
if(xml.readyStata == 4){
if(xml.status == 200){
alert(xml.responeText);
}else{
alert(xml.status);
}
}
}
xml.open("GET","XxxServlet",true);
xml.send();