Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onload = function(){
- var t = new Date();
- t.setTime(1332403882588);//your target time in UTC
- var clock = document.getElementById('clock');
- var inter = setInterval(writeTime,100);
- function writeTime(){
- var out = new Date(t-new Date());
- clock.innerHTML = "Hours: "+out.getHours()+"<br>Minutes: "+out.getMinutes()+"<br>Seconds: "+out.getSeconds();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment