This part of my code isn’t working, I already tried to do everything but it still doesn’t working, what can I do to fix it?
$.ajax({
url: "https://corona-api.com/countries/BR",
type: "GET",
sucess: function(response){
document.getElementById("ifbr").innerHTML = response.latest_data.confirmed
},
error: function(){
document.getElementById("ifbr").innerHTML = "Erro na Consulta !"
}
})
2
Answers
I think you need to change
sucess
intosuccess
, and adddata
like below:You have misspelled
success
hereInstead it should be