跨域Ajax类
当然这个问题以前已经被问过,但我找不到答案。我有一个可以嵌入客户网站的 iframe。我希望能够将表单数据提交回我的网站。我以为Ajax可以解决这个问题,但是它有跨域问题。我也读过有关 jsonp 的内容,但它很令人困惑。是否有任何类我可以用于 ajax 跨域发布或一个很好的教程来阅读。
Sure this question has been asked before but i could not find an answer to it. I have an iframe which can be embed on a customer's site. I want to be able to submit the form data back to my site. I thought Ajax could solve it but it has cross domain issues. I also read about jsonp, but it is confusing. Is there any class i could use for ajax cross domain posting or a good tutorial to read.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
iframe 托管在您自己的站点上,因此您不需要跨域 ajax 即可从 iframe 上下文向您的站点发出 ajax 请求。
The iframe is hosted on your own site, so you don't need cross-domain ajax to make ajax requests back to your site from the context of the iframe.