jsonpcallback({"count":1,"list":[{"s_id":"1","s_u_openid":"ocrNgt-WZWKVdkjIgSz_F_2-QgVo","s_content":"1513213","s_time":"1439175101"}],"end_time":"1439175101"});
方式一:
$.ajax({
type : 'GET',
url : 'http://testweixin.smm.cn/index.php?m=home&c=Index&a=danmu&time=0&num=10&callback=?',
dataType : 'jsonp',
success: function(data){
console.log(data);
alert("信息读取成功提示!");
},
error : function() {
alert('信息读取失败提示!');
}
});
方式二:
$.ajax({
type : 'GET',
url : 'http://testweixin.smm.cn/index.php?m=home&c=Index&a=danmu&time=0&num=10',
dataType : 'jsonp',
jsonp : "jsonpcallback",
jsonpCallback:"jsonpcallback",
success: function(data){
console.log(data);
alert("信息读取成功提示!");
},
error : function() {
alert('信息读取失败提示!');
}
});