<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>audio监听播放完毕</title>
</head>
<body>

<audio src="1.mp3" id="audio" controls="true" autoplay="true">
  <!-- <source src="1.mp3" type="audio/mpeg"> -->
  Your browser does not support the audio element.
</audio>
<script>
    var audio = document.getElementById("audio"); 
    audio.loop = false;
    audio.addEventListener('ended', function () {  
        alert('over');
    }, false);
</script> 
</body>
</html>

 

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-09-12
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案