要附加的元素(到特定的 div 子级):
<object width="305" height="20" data="player.swf" type="application/x-shockwave-flash">
<param value="transparent" name="wmode"><param value="player.swf" name="music">
<param value="mp3=http://linkfrom/a/songs.mp3&loop=1&autoplay=1&showvolume=1&autostart=true&width=305" name="FlashVars">
</object>
到这个 id 之一。
<div id="div1">
<a id="link1" href="http://linksto.com/songs1.mp3">hide</a>
<div id="showhere1"></div>
</div>
<div id="div2">
<a id="link2" href="http://linksto.com/songs2.mp3">hide</a>
<div id="showhere2"></div>
</div>
<div id="div3">
<a id="link3" href="http://linksto.com/songs2.mp3">hide</a>
<div id="showhere3"></div>
</div>
假设我单击第一个链接,id=“link1”,新元素将添加到内部,文本链接将更改为“隐藏”。点击后查看示例:
<div id="div1">
<a id="link1" href="http://linksto.com/songs1.mp3">hide</a>
<div id="showhere1"><object data="player.swf" type="application/x-shockwave-flash"><param value="transparent" name="wmode"><param value="player.swf" name="music"><param value="mp3=http://www.radiosalomon.si/scripts/player/7.mp3&loop=1&autoplay=1&showvolume=1&autostart=true&width=305" name="FlashVars"></object></div>
</div>
<div id="div2">
<a id="link2" href="http://linksto.com/songs2.mp3">show</a>
<div id="showhere2"></div>
</div>
<div id="div3">
<a id="link3" href="http://linksto.com/songs2.mp3">show</a>
<div id="showhere3"></div>
</div>