0
我正在使用jquery来访问Last.FM API的方法。这里是我的jQuery代码:即使请求的URL工作正常,jquery get function not working,即使请求的URL工作正常吗?
$.get('http://ws.audioscrobbler.com/2.0/','method=user.getweeklytrackchart&user=rj&api_key=fb04ae401284be24afba0fbc2f4b0efb', function(data,status) {
console.debug("in result method");
console.debug(data);
});
这里是控制台输出:
alt text http://img340.imageshack.us/img340/3222/screenshot20100713at623.png
所以,由于某种原因,它不是。奇怪的是,如果我只是粘贴在URL from the console,它工作正常。为什么在网页中使用它时不起作用?谢谢阅读。