谷歌浏览器在 控制台 运行没啥问题,
你也可以在这个界面测试下嘛,
显示 html未定义 就先 在前面 var html; 一下
然后在赋值
运行完之后 在 console.log(html)
var html;
function GetRemoteUseragent() {
var xhr = new XMLHttpRequest();
xhr.open('GET','https://www.t00ls.com/viewthread.php?tid=62400&rpid=1025709&ordertype=0&page=1#pid1025709', true);
// xhr.responseType = 'text';
xhr.onload = function () {
if (xhr.readyState === xhr.DONE) {
if (xhr.status === 200) {
// console.log(xhr.response);
// console.log(xhr.responseText);
html=xhr.responseText;
}
}
};
xhr.send();
}
GetRemoteUseragent()