相关疑难解决方法(0)

是否可以通过JavaScript检测插件是否被激活?

这样我通常会检测插件,例如Flash Player:

for (var el in navigator.plugins) {
    if (navigator.plugins[el].name &&
        navigator.plugins[el].name.toLowerCase().indexOf('shockwave') !== -1) {
        console.log(navigator.plugins[el]);
    }
}
Run Code Online (Sandbox Code Playgroud)

我不是在寻找跨浏览器的解决方案,也不想测试它是否正确.测试此插件是否处于活动状态的方法是什么?

javascript plugins detection

3
推荐指数
1
解决办法
2761
查看次数

标签 统计

detection ×1

javascript ×1

plugins ×1