Another ajax example:
var url = 'http://test.com/php/getnews.php';
$.ajax({
type: 'GET',
url: url,
crossDomain: true,
cache: false,
success: function(result) {
/ / var obj = $.parseJSON(result[0]);
console.log(result);
$.each(result, function(i, field) {
console.log(i + ':' + field.title);
});
}
});
No comments:
Post a Comment