Can I make an XMLHttpRequest to another domain?

后端 未结 7 1531
面向向阳花
面向向阳花 2021-02-18 18:29

Is there a way to use XMLHttpRequest in combination with other domains?

I would like to parse some xml from Google without having to use a server so it is minimalistical

7条回答
  •  粉色の甜心
    2021-02-18 18:36

    That's not possible due to the SOP (Same Origin Policy) that browser have these days to restrict XSS attacks.
    You will have to use a server side script (PHP or something).

提交回复
热议问题