blob: 2b08b770f2d2e6359a62674b5eb579fc88af1264 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
const xhr = new XMLHttpRequest();
xhr.open("GET", "https://aidang.cc/webring/all")
xhr.send();
xhr.responseType("json");
xhr.onload = () => {
if (xhr.readyState == 4 && xhr.status == 200) {
console.log(xhr.response);
} else {
console.log(`Error: ${xhr.status}`);
}
}
|