在IE下可以通过<bgsound>来实现,但firefox下不知如何实现....
ie下可这样:
 
function change_music(id,u){
 document.getElementById(id).src=u; 
}
 <bgsound id="sound_tag" />
<a href="#" onmouseover="change_music('sound_tag','Not Afraid.mp3');"  onmouseout="change_music('sound_tag')">声音</a>
firefox下,望指点...

解决方案 »

  1.   

    bgsound 只有ie支持,你可以使用<embed style="display:none">实现
      

  2.   

    用embed ,这样会调用插件,比如我这边的Firefox,它就叫加载插件,quicktime....
    刚用html5的<audio>试了下,不过在firefox下,只支持ogg,wav,
    chrome可支持ogg,wav,mp3
      

  3.   

    是的,你可以转成flash,一般的浏览器都能打开
      

  4.   

    很认真的告诉你:“document.getElementById(id).src=u”在非IE浏览器中是行不通的,目前要兼容唯一的办法是通过innerHTML重写HTMLElment:"<embed src="+u+">",更别说“bgsound”了。当然你可以设置“width”和“height”为“0”。