Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const http = new XMLHttpRequest();
- http.open("GET", "https://ya.ru/index.php",true);
- http.send();
- http.onload = function(e){
- console.log(http.status);//выводит как положено
- }
- console.log(http.status);//выводит 0 т.е. неверный результат
- const response = await fetch('https://ya.ru/index.php');
- console.log(response);
Add Comment
Please, Sign In to add comment