日期:2014-05-17 浏览次数:21006 次
var xhr = window.XMLHttpRequest ? 
                    new window.XMLHttpRequest(): 
                    new window.ActiveXObject("Microsoft.XMLHTTP")
xhr.onreadystatechange = function(){
    if(xhr.readyState == 4){
        var xmlDoc = xhr.responseXML
        // do something what you want ...
    }
};
xhr.open('GET', 'test.xml', true);
xhr.send();