当我玩两个相等的值时,只有第一个玩,而第二个被忽略。例如:如果必须两次,则代码必须先播放一次,但是只能播放一次。
function Linha1() {
let i1 = 0
document.getElementById('girador').style.display = 'inline-block';
interval = setInterval(function () {
if (i1 > 12) return clearInterval(interval)
document.getElementById('girador').style.display = 'none';
if (notas0[i1] === 1) {
C_Teclado.play();
console.log("1");
} else if (notas0[i1] === 2) {
D_Teclado.play();
console.log("2");
} else {
SomVazio.play();
console.log("13");
}
i1++
}, 1000)
}