js监听audio播放完毕

时间:2025-02-23 16:45:35
<!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 = ("audio"); = false; ('ended', function () { alert('over'); }, false); </script> </body> </html>