如何使用 JavaScript 检测浏览器中是否禁用了 Flash Player? [英] How can I detect if Flash Player is disabled in a browser using JavaScript?

查看:39
本文介绍了如何使用 JavaScript 检测浏览器中是否禁用了 Flash Player?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何检测浏览器中是否安装 Flash 播放器.为此,我正在使用 swfobject 的 hasFlashPlayerVersion() 函数.但是,我似乎找不到任何关于如何检测插件是否已安装和是否被禁用的文档.我在 Flash Player 检测工具包中没有看到任何文档检查插件是否已启用.

I know how to detect if Flash player is installed in a browser. I'm using the hasFlashPlayerVersion() function of swfobject for that. However, I can't seem to find any documentation on how to detect if the plug-in is installed and just disabled. I didn't see any documentation in the Flash Player Detection Kit that checks if the plug-in is enabled either.

推荐答案

您可以在与浏览器的 javascript 通信的不可见 swf 中进行 javascript 调用.如果出现超时,则是浏览器没有安装flash player,或者flash player被禁用.

You could make a javascript call in an invisible swf that communicates with the browser's javascript. If a timeout occurs, then it is because the browser does not have flash player installed, or the flash player has been disabled.

getURL("javascript:jsfunction();");

这篇关于如何使用 JavaScript 检测浏览器中是否禁用了 Flash Player?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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