1.建立连接 :
XMLHttpReq=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Msxml2.XMLHTTP");
2.发送请求:
XMLHttpReq.open("GET",url,true);
3.返回请求:
XMLHttpReq.onreadystatechange=function()
{
   if(XMLHttpReq.readystate==4)
   {
      if(XMLHttpReq.status==200)
      {
         updateObj();
      }
      else
      {
         alert("error:"+XMLHttpReq.status);
      }
   }
}
4.页面取数据:
var resCode=XMLHttpReq.responseXML.getElementByTagName("code");