Problema ao usar $getJSON
Estou tentando acessar os dados json da pagina http://bpixel.com.br/teste/itens.json via localhost, porem está aparecendo o seguinte erro no console do googl chrome
XMLHttpRequest cannot load http://bpixel.com.br/teste/itens.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
Alguém sabe dizer o motivo, meu codigo abaixo
var teste;
function carregarJson(){
$.getJSON('[http://bpixel.com.br/teste/itens.json')](http://bpixel.com.br/teste/itens.json%27))
.done(function(data){
teste = data;
console.log(teste);
}).fail(function(){
alert("deu m*****");
})
}
carregarJson();
obs: ele da o alerta =/
Discussão (2)
Carregando comentários...