未引用参考错误:未定义activexobject [英] uncaught Reference error: activexobject is not defined
本文介绍了未引用参考错误:未定义activexobject的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的项目中使用activexobject它在IE中工作正常。
我知道这是微软控件。
我想在Mozila和Chrome中运行该项目,但它显示错误,因为未定义Activexobject。
Hi,
I am using the activexobject in my project it works fine in IE.
I know this is the microsoft control.
I want to run the project in Mozila and Chrome but it showing the error as Activexobject is not defined.
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
提前致谢
Thanks in advance
推荐答案
虽然完全同意JSOP的回答,但有一件事你可以试着让它在FireFox上运行。有一个插件可以让FireFox托管ActiveX控件元素。请参阅此处: http://code.google.com/p/ff-activex-host/ [ ^ ]。你必须尝试一下我猜,但也许这个插件可以帮助你让它与FireFox一起工作。对于谷歌浏览器,您可能对此链接感兴趣: http://www.chromeplus.org/ [ ^ ]。
对于跨浏览器兼容性原因我强烈建议不要在网站上使用ActiveX。
最好的问候,
-MRB
Eventhough totally agree with JSOP's answer there is one thing you can try to also get it to run on FireFox. There is a plugin that enables FireFox to host ActiveX control elements. See here: http://code.google.com/p/ff-activex-host/[^]. You'll have to experiment a bit I guess, but maybe this plugin will help you to get it to work with FireFox. For google chrome you might be interested in this link: http://www.chromeplus.org/[^].
For cross browser compatiblity reasons I strongly discourage the use of ActiveX on a web site though.
Best Regards,
—MRB
实际上,Manfred的谷歌代码项目参考也支持google Chrome。
It还提供了一些安全措施,如站点锁定,CLSID / PROGID锁定,以及与IE风格的HTML / JS代码不兼容,用于创建ActiveX控件。
免责声明:我开发了并且正在维护该项目。
Actually, the google code project reference by Manfred, support google Chrome as well.
It also provides some security measures such as site locking, CLSID/PROGID locking, and incompatibility with IE-style HTML/JS code for creating ActiveX controls.
Disclaimer: I developed and am maintaining that project.
您的问题可以通过jQuery解决:
http://knol.google.com/k/xml-parsing-using-jquery# [ ^ ]
或者你可以做类似的事情:
Your problem can be solved using jQuery:
http://knol.google.com/k/xml-parsing-using-jquery#[^]
Or you can do something similar to:
function parseXML(str) {
if (str == null) return null;
if (
这篇关于未引用参考错误:未定义activexobject的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文