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,它工作正常。爲什麼在網頁中使用它時不起作用?謝謝閱讀。