我需要使用Foursquare API来搜索场馆.当然是跨域的.
It has no any problems in Firefox but in Internet Explorer (7, 8, 9 I've tested).
My javascript code looks like:
searchVenues: function(searchQuery) {
$.ajax({
url: 'https://api.foursquare.com/v2/venues/search',
data: {
sw: bound_south_west,
ne: bound_north_east,
query: searchQuery.query,
oauth_token: FSQ_OAUTH_TOKEN,
limit: 25,
intent: 'browse',
v: 20120206
},
cache: false,
dataType: 'json',
success: function(data) {
displayResults(data, searchQuery.query);
},
error: function(xhr, status, errorThrown) {
console.log(errorThrown+'\n'+status+'\n'+xhr.statusText);
}
});
}
在Firefox中,它完美地显示了接收到的数据. 在Internet Explorer中,它登录控制台:
No Transport
Error
Error
What should I do?