XMLHttpRequest原生请求

 
 
 
 
var result = null;
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
    if (xhr.readyState == 4 && xhr.status == 200) {
        result = xhr.responseText;
    }
}
xhr.open('GET', 'http://www.fangdi.com.cn/eval_decrypt', false);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send();
 
 
 
 

 

posted @ 2022-02-17 21:13  AngDH  阅读(40)  评论(0编辑  收藏  举报