javascript里innerHTML元素替换无效
<html><head>
<title>测试</title>
<script type="text/javascript">
function s02()
{
document.getElementById("sp").innerHTML="
<embed
type='application/x-shockwave-flash' src='http://player.' id='movie_player' name='movie_player'
bgcolor='#FFFFFF'
quality='high'
allowfullscreen='true' flashvars='isShowRelatedVideo=false&showAd=0&show_pre=1&show_next=1&isAutoPlay=false&isDebug=false
&UserID=&winType=interior&playMovie=true&MM
Control=false&MMout=false&RecordCode=1001,1002,1003,1004,1005,1006,2001,3001,3002,3003,3004,3005,3
007,3008,9999'
pluginspage='http://www.'
width='640' height='550'>
</embed>";
}
</script>
</head>
<body>
<div class="dy" id="sp">
<embed
type="application/x-shockwave-flash"
src="http://player.
id="movie_player"
name="movie_player"
bgcolor="#FFFFFF"
quality="high"
allowfullscreen="true"
flashvars="isShowRelatedVideo=false&showAd=0&show_pre=1&show_next=1&isAutoPlay=false&isDebug=false
&UserID=&winType=interior&playMovie=true&MM
Control=false&MMout=false&RecordCode=1001,1002,1003,1004,1005,1006,2001,3001,3002,3003,3004,3005,3
007,3008,9999"
pluginspage="http://www.
width="640"
height="550"> </embed>
</div>
<a href="#" onClick="s02()">第02集</a>
</body>
</html>
这个网页里,有一个视频,和一个按钮。
按第02集时,就应该会改变<embed>整块元素,显示另一个视频。
但是,我点了半天都没反应,不知道出了什么问题,希望高人指点一点,到底哪里出错了? 我都把双引改成单引了,还是不行啊?