How to set an alternate image if the client does not have the correct flash player?
I am having a flash object integrated i开发者_开发问答n my html page. It requires a version of 10 to run it. If the client is not having the flash player of 10 or above, the flash will not come and it will look a bit odd. In that case, I want to show an alternate image. What is the best way to do it?
In fact I have the javascript code for it. But I dont know how to utilize it to get what I need.
var version = deconcept.SWFObjectUtil.getPlayerVersion();
if (document.getElementById && (version["major"] < 10)) {
//Code here
}
Thanks
Put your content within the object tag. If you're not using the object tag you can show / hide this div via javascript:
<object ...>
<div id="no_plugin"><h3>My Viewer</h3><p>Download Flash</p><a href="http://www.adobe.com/flashplayer" style="text-decoration: none;"><img src="http://www.adobe.com/flash.png" alt="Get Adobe Flash" style="border-style: none"></a></div>
</object>
精彩评论