问题描述
当浏览器插件不可用时,显示HTML替代方案的最佳做法是什么?我用这样的对象标签嵌入插件:
What is the best practice for displaying an HTML alternative when a browser plug-in is not available? I'm embedding the plugin with an object tag like so:
<object id="plugin0" type="application/x-myplugin"></object>
这是Google Chrome中显示的未知插件,但我希望解决方案能够正常运行在所有浏览器上(即FF插件/ Chrome插件/ IE ActiveX对象)
This is what an unknown plugin displays as in Google Chrome, however I'd like the solution to work on all browsers (i.e. FF plugin/Chrome plugin/IE ActiveX object)
-foot
推荐答案
如果您正在谈论闪存,如果不支持闪存,您在对象标记中的任何内容都会显示。
If you're talking about flash, whatever you place within the object tag will show up if flash is not supported.
以下是带有后备图片的Flash电影示例:
Here's an example of a flash movie with a fallback image:
<object type="application/x-shockwave-flash data="yourmovie.swf" width="400" height="300">
<param name="movie" value="yourmovie.swf" />
<img src="noflash.gif" width="200" height="100" alt="" />
</object>
我通常使用javascript测试插件并根据测试结果写入页面ts。
I typically test for plugins using javascript and write to the page based on the test results.
这篇关于如果插件不可用,则替代HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!