js控制html页面播放mp3
<audio id="ad" src="mp3/123.mp3"> </audio>
function mp3To(){ let byId = document.getElementById("ad"); byId.play();//开始播放 }
function mp3ToEnd(){ let byId = document.getElementById("ad"); byId.pause();//暂停 }
<audio id="ad" src="mp3/123.mp3"> </audio>
function mp3To(){ let byId = document.getElementById("ad"); byId.play();//开始播放 }
function mp3ToEnd(){ let byId = document.getElementById("ad"); byId.pause();//暂停 }