'猿教程'
;
<audio src="audiofile.mp3" controls></audio>
<script> var audio = document.getElementById('myAudio'); function playAudio() { audio.play(); } function pauseAudio() { audio.pause(); } function setVolume(volume) { audio.volume = volume; } function setCurrentTime(time) { audio.currentTime = time; } </script> <audio id="myAudio" src="audiofile.mp3"></audio> <button onclick="playAudio()">播放</button> <button onclick="pauseAudio()">暂停</button> <input type="range" min="0" max="1" step="0.1" oninput="setVolume(this.value)"> <input type="range" min="0" max="audio.duration" step="1" oninput="setCurrentTime(this.value)">
本文为翻滚的胖子原创文章,转载无需和我联系,但请注明来自猿教程iskeys.com
【支付宝红包】支付宝花呗大红包超大力度 【apicloud】如何打包安卓等级28版本包 【apicloud】自动监听APP权限是否开启 【apicloud】关于如何打包安卓APILevel>26的包