Mozilla的背景声音

时间:2014-04-26 11:40:39

标签: html audio

我知道<bgsound> html不支持Mozilla,HTML背景声音元素<bgsound>是一个将背景声音与页面相关联的Internet Explorer元素。

如何自动播放背景声音&amp;支持mozilla?

1 个答案:

答案 0 :(得分:0)

您可以使用javascript 音频的对象 例如

var audio = new Audio("path to your sound file");
audio.play();

或检查 html标记音频 http://www.w3schools.com/Tags/tag_audio.asp有属性自动播放

或者您可以使用 SoundManager http://www.schillmania.com/projects/soundmanager2/

相关问题