ReferenceError: not defined with activeX

浪子不回头ぞ 提交于 2020-01-16 01:06:13

问题


what does it mean to get this error:

ReferenceError: ActiveXObject is not defined
var fso = new ActiveXObject("Scripting.FileSystemObject");

here is my code:

    var fso = new ActiveXObject("Scripting.FileSystemObject");
    varFileObject = fso.OpenTextFile("C:\\LogFile.txt", 8, true,0); // 8=append, true=create if not exist, 0 = ASCII
    newObject.write(XML.innerHTML);
    newFileObject.close();

thanks in advance..


回答1:


The problem is the security setting of your browser is blocking it.

If you try IE6 the code should work. You have to use a dead browser because the new browsers block it from working as part of a killbit fix that Microsoft did to fix a security issue.



来源:https://stackoverflow.com/questions/14362861/referenceerror-not-defined-with-activex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!