可以将数据发布到JSONP吗?或者,是否所有数据都必须作为GET请求传递到查询字符串中?

I have alot of data that I need to send to the service, cross domain, and it is too large to send via the querystring

解决这个问题有哪些 Select ?

推荐答案

It is not possible to do an asynchronous POST to a service on another domain, due to the (quite sensible) limitation of the same origin policy. JSON-P only works because you're allowed to insert <script> tags into the DOM, and they can point anywhere.

You can, of course, make a page on another domain the action of a regular form POST.

Edit:如果你愿意下大力气插入隐藏的<iframe>并捣乱他们的财产,那么外面大约有interesting hacks个.

Jquery相关问答推荐

使用 Ajax 列出数据(仅显示最后的数据)

jQuery .first() 方法返回第一个元素的集合

加载外部 css 文件,如 jquery 中的脚本,这在 ie 中也兼容

jQuery中的多个 Select 器链接?

如果您的 Select 器对象无效,为什么 jQuery 不会炸弹?

如何在数据表中显示空数据消息

jQuery.parseJSON 与 JSON.parse

JavaScript style.display="none" 还是 jQuery .hide() 更高效?

如何同时使用 requireJS 和 jQuery?

未捕获的 TypeError:data.push 不是函数

jQuery:获取父母,父母ID?

点击时保持 Bootstrap 下拉菜单打开

jQuery Select 器中前导冒号的目的是什么?

捕获在页面任意位置按下的 Enter 键

如何在 TypeScript 中获得 jQuery 自动完成功能?

CSS3 相当于 jQuery slideUp 和 slideDown?

将多个 JavaScript 文件合并为一个 JS 文件

检测页面是否已完成加载

请求的资源错误中不存在Access-Control-Allow-Origin标头

如何使用 ID 变量在 jQuery 中 Select 元素?