XMLHttpRequest cannot load.?

后端 未结 3 1615
耶瑟儿~
耶瑟儿~ 2021-02-07 00:55

I by chrome->Inspect element->console get this error:

XMLHttpRequest cannot load. Origin is not allowed by Access-Control-Allow-Origi

3条回答
  •  梦毁少年i
    2021-02-07 01:35

    You cannot issue requests through the XMLHttpRequest to other domains or subdomains. If you are issuing the request from www.foo.com you also need to target the request at www.foo.com and not leave out the www.

    If you really need to hit another domain you can use JsonP where the browser utilizes the

提交回复
热议问题