html5添加音乐包括暂停
<audio id="musicfx" loop="loop" autoplay="autoplay">
<source src="Besame Mucho.mp3" type="audio/mpeg">
</audio>
<!-- <img src="images/music.png" onclick="document.getElementById('musicfx').play();return false;" class="music" />
<img src="images/music.png" onclick="document.getElementById('musicfx').pause();return false;" class="music" />
-->
<img src="images/music.png" class="music" />
<script type="text/javascript">
$(function(){
$(".music").toggle(
function () {
document.getElementById('musicfx').play();return false;
},
function () {
document.getElementById('musicfx').pause();return false;
}
);
})
</script>