section class = " music rotate " audio loop src= " /static/wishChina/music1.mp3 " id= " audio_play " autoplay preload/audio/section // 下面为jquery处理,加载完成,则调用该方法,播放音乐 function audioAutoPlay(id) { var
<section class="music rotate"> <audio loop src="/static/wishChina/music1.mp3" id="audio_play" autoplay preload></audio> </section> //下面为jquery处理,加载完成,则调用该方法,播放音乐 function audioAutoPlay(id) { var audio = document.getElementById(id); audio.play(); document.addEventListener("WeixinJSBridgeReady", function () { audio.play(); }, false); document.addEventListener(‘YixinJSBridgeReady‘, function () { audio.play(); }, false); }