JavaScript的方式,列出了IE可用的插件 [英] Javascript way to list available plugins for IE

查看:69
本文介绍了JavaScript的方式,列出了IE可用的插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个快速的方式来获得在JavaScript中可用的Active X插件列表?

Is there a quick way to get a list in JavaScript of the available Active X plugins?

我需要做一个测试,看是否有插件被安装之前,我确实尝试运行它。

I need to do a test to see if a plugin has been installed before I actually try to run it.

在效果我想创建一个网页,上面写着'插件安装并正常工作或有它优雅地失败。

In effect I want to create a page that says 'Plugin Installed and properly Working' or have it fail gracefully.

我不知道如何有,如果该插件不存在,它优雅地失败。

I'm not sure how to have it fail gracefully if the plugin is not available.

推荐答案

只是尝试了。

try {
  var plugin = new ActiveXObject('SomeActiveX');
} catch (e) {
  alert("Error"); // Or some other error code
}

这篇关于JavaScript的方式,列出了IE可用的插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆