Answer the question
In order to leave comments, you need to log in
How to make a cross-server GET request from Javascript?
Good day.
Forming a cross-server XMLHttpRequest request:
var request = new XMLHttpRequest();
request.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
console.log(this.responseText);
}
};
request.open('GET', 'https://account.exemple.com/id');
request.send();
}
Access-Control-Allow-Origin
, the essence of which is more or less clear: window.open("https://account.exemple.com/id", "_blank")
<span data-v-50ca0f34="" data-v-15d61d2e="" class="balance">0,00 Р</span>
0,00 Р
Answer the question
In order to leave comments, you need to log in
Proxy through your server.
Make a request to yourself, use your server to take the markup from someone else's site, parse and give the necessary values to the front.
Not unless the site allows it. It is from such cases that CORS protection is made.
PS example
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question