Saturday, 31 August 2013

Loading json data to div using jquery ajax call

Loading json data to div using jquery ajax call

Can anyone please tell me what is wrong with the given below code. I am
trying to load data in a div using json call.
function getData(){
$.ajax({
url: "http://echo.jsontest.com/key/value/one/two",
type: "get",
dataType: "JSON"
}, function(data){
$('#99').append(JSON.stringify(data));
});
return false;
}
It would be great if someone can put some light on $.ajax, $.get, $.post
and $.getJSON

No comments:

Post a Comment