Permission Denied Error XMLHttpRequest

后端 未结 3 1063
梦毁少年i
梦毁少年i 2021-01-25 13:33
  
    


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-25 13:45

    Since you're setting Content-type, you need to also set it to use UTF-8. And I think it's supposed to be application/xml (source).

    xmlhttp.setRequestHeader("Content-Type", "application/xml; charset=utf-8");
    

    Otherwise, have you verified that the XML is properly formatted? Try saving it as a complete XML file and open it in your browser.

提交回复
热议问题