问题
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