如何处理 Proxy Digg JSON 以与 jQuery 一起使用?

发布于 2024-08-04 00:12:14 字数 125 浏览 2 评论 0原文

我正在尝试处理:“必须对网页上运行的 Javascript 发出的请求进行代理,以避免同源策略冲突。”

一旦获得 JSON,我就知道如何使用它。但除了通过浏览器复制粘贴 JSON 结果之外,我不知道如何本地化它以供使用。

I'm trying to deal with: "Requests made from Javascript running on your web pages must be proxied to avoid same-origin policy conflicts."

I know how to work with the JSON once I've got it. But aside from copy-pasting the JSON results via my browser, I don't know how to localize it for use.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北笙凉宸 2024-08-11 00:12:14

你尝试过吗

$.getJSON('url', function(data){
//do smth with data
})

请求完成后,data将是一个包含所有JSON响应的对象,您可以像常规js对象一样访问它:data.something等等。

Did you tried

$.getJSON('url', function(data){
//do smth with data
})

?

After the request is complete, data will be an object with all JSON response and you can access it as regular js object: data.something and so on.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文