Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onload = function() {
- let div = document.createElement('div');
- div.className = "time";
- div.innerHTML = "Время <br><div id=\"timeUpdate\">31 Apr 2020 <br> 24:34</div>";
- document.body.append(div);
- a = setInterval(function() {
- let div = document.getElementById('timeUpdate');
- dt = Date().substr(4,20)
- div.innerHTML = dt.substr(4, 2) + " " + dt.substr(0,3) + " " + dt.substr(7, 4) + "<br>" + dt.substr(12, 8);
- },1000)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement