SCRIPT5: Access is denied in IE9 on xmlhttprequest

后端 未结 11 1913
太阳男子
太阳男子 2020-11-28 07:42
var xhttp=new XMLHttpRequest();
xhttp.open(\'GET\', \'foo.xml\', false);

F12 pops back: SCRIPT5: Access is denied. on Line 95, which is

11条回答
  •  清酒与你
    2020-11-28 08:33

    I think that the issue is that the file is on your local computer, and IE is denying access because if it let scripts have access to files on the comp that the browser is running on, that would be a HUGE security hole.
    If you have access to a server or another comp that you could use as one, maybe you could try putting the files on the that, and then running the scripts as you would from a website.

提交回复
热议问题