Вход Регистрация
* Balltazor

До нового года

  1. <script type='text/javascript'>
  2. //<![CDATA[
  3. function fulltime () {
  4. var time=new Date();
  5. var newYear=new Date("01,01,2015,00:00:00");
  6. var totalRemains=(newYear.getTime()-time.getTime());
  7. if (totalRemains>1){
  8. var RemainsSec = (parseInt(totalRemains/1000));
  9. var RemainsFullDays=(parseInt(RemainsSec/(24*60*60)));
  10. var secInLastDay=RemainsSec-RemainsFullDays*24*3600;
  11. var RemainsFullHours=(parseInt(secInLastDay/3600));
  12. if (RemainsFullHours<10){RemainsFullHours="0"+RemainsFullHours};
  13. var secInLastHour=secInLastDay-RemainsFullHours*3600;
  14. var RemainsMinutes=(parseInt(secInLastHour/60));
  15. if (RemainsMinutes<10){RemainsMinutes="0"+RemainsMinutes};
  16. var lastSec=secInLastHour-RemainsMinutes*60;
  17. if (lastSec<10){lastSec="0"+lastSec};
  18. document.getElementById("RemainsFullDays").innerHTML=RemainsFullDays+"<span id='Rem'></span>";
  19. document.getElementById("RemainsFullHours").innerHTML=RemainsFullHours+"<span id='Rem'></span>";
  20. document.getElementById("RemainsMinutes").innerHTML=RemainsMinutes+"<span id='Rem'></span>";
  21. document.getElementById("lastSec").innerHTML=lastSec+"<span id='Rem'></span>"; <!-- highslide start -->
  22. setTimeout('fulltime()',10)
  23. }
  24. else{
  25. document.getElementById("clock").innerHTML="С новым годом! :)";
  26. }
  27. }
  28. //]]>
  29. </script>
  30.  
  31. </style>
  32. <div id='clockall'>
  33. <div id='clou_xs'>
  34. <div class='nav1'><img src='/style/icons/fav.gif' alt='o'/> <b><font color='orange'>До нового 2o15 года осталось:</b></font><br>
  35. <font color='#1E90FF'><b><span id='RemainsFullDays'></span></b> Дн,</font> <font color='#4169E1'><b><span id='RemainsFullHours'></span></b> Час,</font> <font color='#0000FF'><b><span id='RemainsMinutes'></span></b> Мин,</font> <font color='#0000CD'><b><span id='lastSec'></span></b> c.</font>
  36. <script type="text/javascript">fulltime();</script>
  37. </div>
  38. </div>
» Описание: В период зимы этот код актуален всегда
» Время добавления: 29 Окт 2014 в 14:15
» Посмотров: 858
» textarea
» Рейтинг: [+0 | -0]
Комментарии [1]
Онлайн: 2
Реклама