什么是JQuery的使用JSONP交谈.NET一些很好的例子? [英] What are some good examples of JQuery using JSONP talking to .net?

查看:288
本文介绍了什么是JQuery的使用JSONP交谈.NET一些很好的例子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为这个问题说,什么是一些很好的例子(或只是例子真的),jQuery的使用JSONP跟一个.NET页面或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?

我试图写一个网页,其中使用jQuery来调用另一个网站(因此我需要使用JSONP),它承载Web服务/网页(无论是好的),我不能找到一个很好的例子。

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.

推荐答案

JSONP只是JSON包装在一个js方法。 jQuery提供的方法名称作为查询字符串该JSONP端点必须再取,敷在JSON再发回响应回调参数。服务器端语言真的是无关紧要的。

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与WCF

良好的截屏

&放大器;以下

里克施特拉尔上有一篇博客文章
<一href="http://weblogs.asp.net/rashid/archive/2007/09/28/implement-jsonp-in-your-asp-net-application.aspx"相对=nofollow>另一个

这篇关于什么是JQuery的使用JSONP交谈.NET一些很好的例子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆