XMLHttpRequest() ajax 浏览器支持
ActiveXObject("Microsoft.XMLHTTP") ajax IE
send() 确认
readyState  ajax工作状态
onreadystatechange 监听ajax工作状态
responseText 返回ajax请求的内容
status http状态码

1。创建ajax对象
var xml=XMLHttpReques();
xml=null;
if(window.XMLHttpReques){xml= new XMLHttpReques();}
else{xml= new ActiveXObject("Microsoft.XMLHTTP");}

2。打开方式 open('get','123.txt','true')

3。提交发送请求 xml.send();

4。等待服务器返回内容;
 
   XML.onreadystatechange = function () {
                if (XML.readyState == 4) {
                     if(XML.status==200){
                         document.body.innerHTML=XML.responseText;
                     }else{
                         document.body.innerHTML='出错了 err:'+XML.status;
                     }
                }
            }
http://amazeui.org

第七日. 2016/3/24 21:03:49
http://www.coolsite360.com