What are some good examples of JQuery using JSONP talking to .net?

孤人 提交于 2019-12-28 05:36:17

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/448879/what-are-some-good-examples-of-jquery-using-jsonp-talking-to-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!