Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法测试设备是否支持 Flash,类似于http://www.modernizr.com可以特征检测浏览器并向正文添加类的方式?
Flash 或 Flashbuilder 等创建的模板文件有 javascript 检查,以验证用户是否安装了正确的 Flash 播放器版本,如果没有,他们可以选择下载播放器。您可以将此下载链接替换为您想要的任何内容,这样如果没有 Flash 播放器,它将依赖您选择的任何内容。或者,您可以使用 User-Agent HTTP 标头来确定他们是否使用 iOS 设备并消除他们完全运行 flash 的可能性,然后假设如果他们有其他任何东西,他们可以安装 flash 播放器(是的,我有点苦的)。