跨域请求和JQuery [英] Cross Domain Request and JQuery

查看:118
本文介绍了跨域请求和JQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用$ .getJSON()通过jquery向一个Web服务做一个跨域请求,它工作正常!但是,当我尝试在Internet Explorer 7或8中提出相同的请求时,请求永远不会发送。任何人都有任何想法?

Im trying to make a cross domain request to a web service via jquery using $.getJSON() and it works fine! However, when I try to make the same request in Internet Explorer 7 or 8 the request is never sent. Anyone have any ideas?

推荐答案

JSONP就是为了这个目的。请检查 getJSON jQuery文档中的JSONP部分。

JSONP is here for this purpose. Check the JSONP section in getJSON jQuery documentation.

这篇关于跨域请求和JQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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