Cross Domain Request and JQuery

雨燕双飞 提交于 2019-12-20 04:10:40

问题


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?


回答1:


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




回答2:


IE explicitly blocks cross domain requests. Better to use a cross domain proxy on your server for better results!

Some documentation: http://ajaxpatterns.org/Cross-Domain_Proxy



来源:https://stackoverflow.com/questions/5006588/cross-domain-request-and-jquery

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