JQuery 使用 JSONP 与 .net 交互的一些很好的例子是什么?

发布于 2024-07-11 18:26:45 字数 157 浏览 3 评论 0原文

正如问题所说,Jquery 使用 JSONP 与 .net 页面或 Web 服务对话有哪些好的示例(或者实际上只是示例)?

我正在尝试编写一个使用 JQuery 调用另一个网站的页面(因此我需要使用 JSONP)来托管 web 服务/网页(两者都可以),但我找不到一个很好的例子。

As the question says, what are some good examples (or just examples really), of Jquery using JSONP to talk to a .net page or webservice?

I'm attempting to write a page which uses JQuery to call another website (Thus I need to use JSONP) which hosts the webservice/webpage (either is fine), and I can't find a good example of this.

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

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

发布评论

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

评论(1

抹茶夏天i‖ 2024-07-18 18:26:45

JSONP 只是封装在 js 方法中的 json。 jQuery 提供方法名称作为查询字符串上的回调参数,然后 jsonp 端点必须获取该参数并将 json 包装在其中,然后发回响应。 服务器端语言确实无关紧要。

使用 WCF 的 JSONP

vimeo.com/1535196" rel="nofollow noreferrer">不错的截屏视频

& 下面有几篇文章

Rick Strahl 有一篇关于它的博客文章
另一个< /a>

JSONP is just json wrapped inside a js method. jQuery provides the method name as a callback parameter on the querystring which the jsonp endpoint must then take and wrap the json in then send the response back. The server side language really is irrelevant.

JSONP with WCF

Good screencast

& a few articles below

Rick Strahl has a blog post on it
Another

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