XMLHttpRequest to get HTTP response from remote host

前端 未结 4 2020
礼貌的吻别
礼貌的吻别 2021-01-02 06:24

Why the following code Based on Mozilla example does not work? Tried with Firefox 3.5.7 & Chrome.



        
4条回答
  •  我在风中等你
    2021-01-02 06:43

    Your browser is preventing cross-site scripting. You have to use a relative path, otherwise most browsers will simply return an error or an empty responseText.

    The following Stack Overflow post is probably also related to your problem:

    • Empty responseText from XMLHttpRequest.

提交回复
热议问题