Firefox中如何检测Flash Player是否被屏蔽?

不是检测flash player的版本,而是检测是否被屏蔽。

ff中,about:config可以通过设置default_plugin_disabled为false来屏蔽flash或者其它的办法。

问题是如何通过js来得知用户是否装了flash但却屏蔽了呢?

可以 在页面中写入一段引用flash的代码

然后使用JavaScript调用这段代码

如果能够调用 那么证明没有屏蔽啊

function testPlugin(){ sID="{D27CDB6E-AE6D-11cf-96B8-444553540000}" with(info){ addBehavior('#default#clientcaps') info.innerText=isComponentInstalled(sID,"componentid")?'Flash插件已安装,版本:'+getComponentVersion(sID,"componentid"):"未安装插件" } } window.attachEvent("onload",testPlugin)

系统正在检测你的播放器版本...