如果浏览器没有检测到HTML5音频控制器,它将回退swf播放器。
但由于某些未知原因IE8不显示swf播放器。 swfobject.js与html位于同一文件夹中。
以下是完整代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("myId", "9.0.0", "expressInstall.swf");
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<center>
<audio controls preload="auto" autobuffer>
<source src="friday.ogg" />
<source src="friday.mp3" />
<div class="fallback">
<object type="application/x-shockwave-flash" data="xspf_player.swf?playlist_url=playlist.xspf&autoplay=true
&repeat_playlist=true&player_title=KICK&playlist_size=3"
width="400" height="151">
<param name="movie" value="xspf_player
.swf? playlist_url=playlist.xspf&
;autoplay=true&repeat_playlist=true&player_title=
KICK&playlist_size=3" />
</object>
</div>
</audio>
</center>
</body>
</html>
答案 0 :(得分:0)
您使用的是swfobject.registerObject("myId", "9.0.0", "expressInstall.swf")
,但网页上没有ID为“myId”的元素。