![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglpJ3sf5jTHGrdAwSXU3NIyYd1Su1fjQ_hK6_afCR351NdkPJ2hY7z88hjiFS5i6eBgNPqQfPBRK8fv7SCEWSBSWpKshGcbnCglrhR16Z0ScU68jyKVqkNJgKMzyHYfPOV0R8NPZjN29uDH1NItvhPbRInRNIdJnX1G0NmJ0RuYPZ30icker8Akc6O/s640/maxresdefault.jpg)
Ниже оставил готовый скрипт.
<div id="timer"></div> <script> window.onload = time(); function time() { timeend = new Date(); timeend = new Date(timeend.getYear() > 1900 ? (timeend.getYear() + 1) : (timeend.getYear() + 1901), 0, 1); today = new Date(); today = Math.floor((timeend-today) / 1000); timestr="Before the new " + (new Date().getYear() + 1901) + " year, there are: " + today + " seconds"; document.getElementById('timer').innerHTML = timestr; window.setTimeout("time()", 1000); } </script>
0 Комментарии