Advertisement
8u

Countdown html

8u
Aug 23rd, 2021
111
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.55 KB | None | 1 0
  1. <script type="text/javascript">
  2.  
  3. today = new Date();
  4.  
  5. BigDay = new Date("MM/DD, YY");
  6.  
  7. msPerDay = 24 * 60 * 60 * 1000 ;
  8.  
  9. timeLeft = (BigDay.getTime() - today.getTime());
  10.  
  11. e_daysLeft = timeLeft / msPerDay;
  12.  
  13. daysLeft = Math.floor(e_daysLeft);
  14.  
  15. e_hrsLeft = (e_daysLeft - daysLeft)*24;
  16.  
  17. hrsLeft = Math.floor(e_hrsLeft);
  18.  
  19. minsLeft = Math.floor((e_hrsLeft - hrsLeft)*60);
  20.  
  21. document.write("There are only<BR> <H4>" + daysLeft + " days " + hrsLeft +" hours and " + minsLeft + " minutes left </H4> Until December 25th 2020<P>");
  22.  
  23. </script>
  24.  
  25. by 8u
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement