-2
我一直在试图为此找到答案,但我无法真正地将其解决。 我需要JavaScript代码来显示一个随机数25次,每个数字有320ms的延迟。 (忽略除//开始滚动其他的东西)以320ms的延迟显示一个随机数25次Js
function roll() {
var win = Math.floor(Math.random() * 25) + 0
//change the button when rolling
rollButton.disabled = true;
rollButton.innerHTML = "Rolling...";
rollButton.style.backgroundColor = "grey";
rollButton.style.color = "black"
setTimeout(unDisable, 8000)
//start roll
(insert code here)
}
谢谢如果你能帮助
您可以编写代码,以便它打印一个随机数0-24到:的document.getElementById( “dispNum”)的innerHTML – shtabbbe
完成!我已更改代码以反映 –
非常感谢! – shtabbbe