Files
windows11/public/script.js
T
2021-08-28 16:02:14 +05:30

16 lines
378 B
JavaScript

var percentageElement = document.getElementById("percentage");
var percentage = 0;
function process() {
percentage += parseInt(Math.random() * 10);
if (percentage > 100) {
percentage = 100;
}
percentageElement.innerText = percentage;
processInterval();
}
function processInterval() {
setTimeout(process, Math.random() * (1000 - 500) + 500)
}
processInterval();