我儘量讓一個jQuery Ajax請求「http://pastebin.com/raw.php」,並使用此代碼:JQuery的Ajax請求http://pastebin.com/raw.php
$.ajax({
url: 'http://pastebin.com/raw.php',
data: "i=VJ29uFnk",
complete: function(jqXHR, textStatus) {
alert('complete');
},
success: function(data) {
alert(data);
},
error: function(xhr, status, error) {
alert('noh!')
}
});
有了這個,我得到一個狀態「404 「XHR內,但網址我可以看到螢火蟲看起來是正確的:
http://pastebin.com/raw.php?i=VJ29uFnk
想法?
由於同源策略,您應該獲取拒絕訪問,而不是404 – 2013-05-08 20:22:54
**否**,您不能這樣做。 - > http://en.wikipedia.org/wiki/Same_origin_policy – 2013-05-08 20:23:58