JQuery 使用 JSONP 与 .net 交互的一些很好的例子是什么?
正如问题所说,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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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