【发布时间】:2012-04-23 00:51:03
【问题描述】:
我正在尝试通过 jQuery 获取 this remote JSONP feed。
每次尝试时,我都会收到“Uncaught SyntaxError: Unexpected token (”或类似的错误。
我做错了什么还是 JSONP 数据中的某些内容被错误地格式化/转义?
小提琴:http://jsfiddle.net/callmeed/d3tSX/2/
var _event_url = "http://calvaryslo.onthecity.org/plaza/*events*?format=json";
$.ajax({
type: 'GET',
url: _event_url,
dataType: 'jsonp',
success: function(msg) {
alert(msg.length);
}
});
【问题讨论】:
-
这个url返回JSON格式的数据,不是JSONP
-
您是否可以控制该页面上的输出,还是第三方 API?
标签: javascript jquery json jsonp