clubilim,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script>
document.addEventListener('DOMContentLoaded', ready);
function ready()
{
const options = {
increment: .01, // прибавлять от .01 до 0.7
different: .7,
basic: 0.7, //начальное число
delay: 10000, // пауза 10 сек
differentDelay: 0,
elem: document.querySelector('.box'), //куда выводить
key: 'basic' //ключ базы??? localStorage в качестве базы данных
};
const random = (increment, different) => +(increment + Math.random() * different);
const loop = () => {
options.basic = localStorage.basic ? +localStorage[options.key] : options.basic;
options.elem.innerHTML = options.basic.toFixed(2);
options.basic += random(options.increment, options.different);
localStorage[options.key] = options.basic;
setTimeout(loop, random(options.delay, options.differentDelay))
}
loop()
}
</script>
</head>
<body>
<div class="box"></div>
</body>
</html>