1 2 3 4 5 6 7 8 9 10 11 12 13 14
<html> <body> <p> Counting up every 50ms </p> <input id="input" value="0"/> <script> window.addEventListener('load', function() { var inputElement = document.getElementById('input'); window.setInterval(function() { inputElement.value = inputElement.value * 1 + 1; }, 50); }); </script> </body> </html>