监听audio是否播放完

  • Post author:
  • Post category:其他


var audio=document.getElementById(‘audio’);

if(audio){



audio.loop = false;



audio.addEventListener(‘ended’, function () {



$(‘#playvoice’).attr(“src”,’images/play_voice_off.png’);

//在这个方法里写相应的

逻辑

就可以了



}, false);

}