Mọi người ơi.
em chạy code trên newtab của Chrome thì bị lỗi này
XMLHttpRequest cannot load https://www.facebook.com/. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘chrome://newtab’ is therefore not allowed access.
Nó bảo phải mở facebook lên mới cho chạy.
Còn chạy trên Firefox thì không sao
Có cách nào để chạy được hàm này trên new tab của chrome không ạ. em cảm ơn ạ
var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://www.facebook.com', true);
xhr.send(null);
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?