Show HTML when flash fails?

假装没事ソ 提交于 2019-12-25 02:46:56

问题


I am using jcupload whats nice is all i need to write is the below and the flash+js does the rest

<div id="jcupload_content"></div>

However this is the ONLY flash on my site. If the user doesnt have flash (think ipod) i'd like to fallback to an html implementation. How do i do it? I know logically ppl wont be uploading via ipods but if i were to play music i can use a flash audio player fallback to html5 audio in that case.


回答1:


Better to use HTML5 audio, then fallback to Flash, I'd say ;).

How are you embedding your Flash? If you're using swfobject, they give some great examples in their documentation page.




回答2:


Swf Object should help.




回答3:


Just use swfobject to place the flash, but in the div that you're placing the flash into, have alternate HTML content.

Like so:

<div id="flashDiv">
    <p>No flash!</p>
</div>

<script type="text/javascript">
    swfobject.embedSWF('myFlash.swf', 'flashDiv', width, height, 'flash.version.here', 'expressInstall.swf', flashvars, params, attributes);
</script>

per swfobject documentation.



来源:https://stackoverflow.com/questions/4073050/show-html-when-flash-fails

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!