gpt4 book ai didi

javascript - JQuery Ajax 请求到 http ://pastebin. com/raw.php

转载 作者:行者123 更新时间:2023-11-30 18:03:03 24 4
gpt4 key购买 nike

我尝试向“http://pastebin.com/raw.php”发出 JQuery ajax 请求' 并使用此代码:

$.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!')
}
});

有了这个,我在 xhr 中得到了状态“404”,但我在 Firebug 中看到的 url 看起来是正确的:

http://pastebin.com/raw.php?i=VJ29uFnk

想法?

最佳答案

XHR 调用受 Same origin policy 保护.

然而,您可以做的是调用一个服务器端脚本来绕过它。

关于javascript - JQuery Ajax 请求到 http ://pastebin. com/raw.php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16449492/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com