Я подключаю js к html странице но появляется ошибка "No 'Access-Control-Allow-Origin' header is present on the requested resource."
Вот код:
function Parse (params, method) {
// Formating
var access_token = '25a545548xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
var v = 5.78
var params = Object.extend({}, params, {
access_token,
v
})
var url = Format(params, method)
// Send request
$.ajax({
url,
dataType : "json",
headers: {'Access-Control-Allow-Origin': '*'},
success: function (data, textStatus) {
console.log(data)
}
})
}