search

Home  >  Q&A  >  body text

javascript - ajax 跨域问题

XMLHttpRequest cannot load http://www..com/login/isLogin. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www..com' is therefore not allowed access.

弄清楚了。是顶级域名的问题。

PHP中文网PHP中文网2834 days ago523

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-10 13:13:24

    jsonp 留意下,最常见就是callback =?

    reply
    0
  • 阿神

    阿神2017-04-10 13:13:24

    是不是设置了withCredentials = true;?

    reply
    0
  • Cancelreply