叼花硬汉 2008-11-18 13:43 采纳率: 0%
浏览 780

如何通过 JavaScript 发送跨域 POST 请求?

How do I send a cross-domain POST request via JavaScript?

Notes - it shouldn't refresh the page, and I need to grab and parse the response afterward.

Your help with some code examples will be much appreciated.

转载于:https://stackoverflow.com/questions/298745/how-do-i-send-a-cross-domain-post-request-via-javascript

  • 写回答

16条回答 默认 最新

  • elliott.david 2009-08-19 18:39
    关注

    High level.... You need to have a cname setup on your server so that other-serve.your-server.com points to other-server.com.

    Your page dynamically creates an invisible iframe, which acts as your transport to other-server.com. You then have to communicate via JS from your page to the other-server.com and have call backs that return the data back to your page.

    Possible but requires coordination from your-server.com and other-server.com

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog