📜  XMLHttpRequest 对象 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:08.409000             🧑  作者: Mango

代码示例2
function reqListener () {
  console.log(this.responseText);
}

var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
oReq.open("GET", "http://www.example.org/example.txt");
oReq.send();