Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <br /><!-- AVISO CONTADOR -->
  2. <div align="center">
  3. <script languaje="JavaScript">
  4. function getTime() {
  5. now = new Date();
  6. y2k = new Date("Nov 18 2017 23:59:59");
  7. days = (y2k - now) / 1000 / 60 / 60 / 24;
  8. daysRound = Math.floor(days);
  9. hours = (y2k - now) / 1000 / 60 / 60 - (24 * daysRound);
  10. hoursRound = Math.floor(hours);
  11. minutes = (y2k - now) / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
  12. minutesRound = Math.floor(minutes);
  13. seconds = (y2k - now) / 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
  14. secondsRound = Math.round(seconds);
  15. sec = (secondsRound == 1) ? " segundo" : " segundos";
  16. min = (minutesRound == 1) ? " minuto" : " minutos, ";
  17. hr = (hoursRound == 1) ? " hora" : " horas, ";
  18. dy = (daysRound == 1) ? " día" : " d&iacute;as, "
  19. document.getElementById("counter").innerHTML = "Faltan " + daysRound + dy + hoursRound + hr + minutesRound + min + secondsRound + sec + " <br />para el 2012!!!";
  20. newtime = window.setTimeout("getTime();", 1000);
  21. }
  22. </script>
  23. <body onLoad="getTime()">
  24. </div>
  25.  
  26. <p style="color:#000000;text-align:center;" id="counter"></p>
  27. <!-- AVISO CONTADOR -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement