有没有办法从一开始制作声音垃圾邮件?到目前为止,我有这个:
<audio controls src="https://www.dropbox.com/s/a6wqamnhhmprvwu/OOF.wav?dl=1" id="audio"></audio>
<script>
var one;setInterval(two,1);
function two{
var audio = document.getElementById("audio");
audio.pause();
audio.currentTime = 0;
audio.play();
}
</script>
答案 0 :(得分:1)
将间隔增加到1000毫秒
<audio controls src="https://www.dropbox.com/s/a6wqamnhhmprvwu/OOF.wav?dl=1" id="audio"></audio>
<script>
setInterval(two, 1000);
function two() {
var audio = document.getElementById("audio");
audio.pause();
audio.currentTime = 0;
audio.play();
}
</script>
&#13;