我有一个简单的自动播放片段播放音频文件,但我想知道在JavaScript或作为属性播放该文件在某个时间(例如3:26).
<script type="text/javascript">
var myAudio=document.getElementById('audio2')
myAudio.oncanplaythrough=function(){this.play();}
</script>
<audio id="audio2"
preload="auto"
src="file.mp3"
oncanplaythrough="this.play();">
</audio>
Run Code Online (Sandbox Code Playgroud)
任何帮助都会很棒.提前致谢 :)