要播放HTML <audio>块,请首先使用以下HTML-
<audio id = "one"> <source src = "new1.mp3" type = "audio/mp3"> </audio > <audio id = "two"> <source src = "new2.mp3" type = "audio/mp3"> </audio >
以下是您要一一播放音频的操作-
var one = document.getElementById('one'); one.onended = function() { document.getElementById('two').play(); } one.play();