问题描述
我知道这可以通过创建一个ActiveX对象在IE中完成,但是我怎样在FF中做到这一点。 navigator.plugins ['Adobe Acrobat']对象让我知道它是否安装,但它不包含版本号。任何想法?
I know this can be done in IE by creating an ActiveX object, but how do I do it in FF. The navigator.plugins['Adobe Acrobat'] object lets me know if it's installed or not, but it doesn't contain the version number. Any ideas?
推荐答案
navigator.plugins [n] .name where n 是Acrobat插件的索引应该有版本号。不幸的是,从Adobe Reader 8开始,他们将名称改为Firefox和Netscape的Adobe PDF插件,没有版本信息。所以,如果这是你至少在Reader 8中检测到的名字,但是不能从9中知道第8版。
navigator.plugins[n].name where n is the index of the Acrobat plugin is supposed have the version number in it. Unfortunately, starting with Adobe Reader 8, they changed the name to "Adobe PDF Plug-In for Firefox and Netscape", with no version information. So, if this is the name you've detected at least Reader 8, but can't tell versions 8 from 9.
另外,请确保考虑到Mac不需要Acrobat Reader来渲染PDF文件。 (我启动Windows分区只是为了测试这个。)
Also, make sure you take into account that Macs don't need Acrobat Reader to render PDF files. (I booted my Windows partition just to test this.)
这篇关于如何通过JavaScript检测Firefox中安装的Adobe Acrobat版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!