如何使用 JavaScript 以编程方式检查是否安装了特定版本的 Flash Player?
我有一个java脚本代码,我想检查是否安装了flash播放器,如果安装了哪个版本? 需求要求我在不使用 SWFObject 的情况下实现这一目标。相反,我想要一些简单的 JavaScript 代码。 我使用了以下代码片段:
currentVer = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.10");
version = currentVer.GetVariable("$version");
但它抛出了错误消息,
未找到文件名或类名 自动化操作期间
我想使用javascript编码本身来实现,而不需要下载任何软件,例如SWFObject。 我正在使用IE。 请帮我解决这个问题。
I have a java script code and I want to check if flash player is installed or not and if at all it is installed which version ?
Requirement demands me to achieve this without using SWFObject. INstead I want to some simple javascript code.
I used the following snippet:
currentVer = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.10");
version = currentVer.GetVariable("$version");
But its throwing the error msg,
File name or class name not found
during Automation operation
I want to achieve using javascript coding itself, without downloading any software for it like SWFObject.
I am using IE.
Kindly help me with this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您已经拥有了大部分内容,只是缺少其中的测试部分。不幸的是,实际上没有一种方法可以访问给定的属性来告诉您您想要什么。您必须尝试创建该对象。
You have most of it right there, you're just missing the testing part of it. Unfortunately there isn't really a way to access a given property that tells you what you want. You have to try to create the object.
Adobe 拥有一整套用于检测和(可选)升级 Flash 版本的工具包,包括 HTML 示例;您可以在此处找到它。
从该页面:
Adobe has a whole kit for detecting and (optionally) upgrading the version of Flash, including HTML examples; you can find it here.
From that page: