【发布时间】:2010-12-07 05:27:39
【问题描述】:
谁能告诉我为什么这个标记在 Safari 中可以正常工作,但在 Firefox 中却不行?
这应该加载一个丑陋的蓝色占位符(我在 safari 中得到),但在 Firefox 中,swfobject 只是给了我替代内容。
http://www.johndierks.com/stackoverflow/preloader.html
感谢您的帮助。
这是我从 SwfObject 的 google 代码站点获得的代码供参考。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>SWFObject 2 full browser flash</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="screen">
html, body, #content { height:100%; }
body { margin:0; padding:0; overflow:hidden; }
#altContent { /* style alt content */ }
</style>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("myId", "9.0.0", "expressInstall.swf");
</script>
</head>
<body>
<div id="content">
<object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%">
<param name="movie" value="ccholidaypreloader.swf" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="test6.swf" width="100%" height="100%">
<!--<![endif]-->
<div id="altContent">
<h1>Alternative content</h1>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</body>
</html>
【问题讨论】:
标签: javascript flash debugging cross-browser swfobject