html> До нового года осталось - Форум
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
До нового года осталось
Ex_WarДата: Пятница, 24.12.2010, 12:27 | Сообщение # 1
Логин: Ex_War
Имя: Александр Барсуков
Сообщений: 252
Награды: 0
Репутация: 71
Замечания:
ID вашей групы: 1
Offline

Code
</script></div><div align="center" ><FONT color="#c9a82f">До Нового Года Осталось:</FONT></div><br>  
<div id='x1' ></div>  
<div align="center" ><script Language="javascript">  
var timeStr, dateStr, ostStr, x;  
function clock() {  
now= new Date();  
ex = new Date(2011,0,1,0,0,0);  
hours= now.getHours();  
minutes= now.getMinutes();  
seconds= now.getSeconds();  
timeStr= "" + hours;  
timeStr+= ((minutes < 10) ? ":0" : ":") + minutes;  
date= now.getDate();  
month= now.getMonth()+1;  
year= now.getYear();  
dateStr= "" + date;  
dateStr+= ((month < 10) ? "/0" : "/") + month;  
dateStr+= "/" + year;  
ostStr= "";  
x = (ex.getTime() - now.getTime())/1000;  
ostStr = Math.floor(x/60/60) + ' ч. ';  
ostStr = ostStr + Math.floor((x/60/60 - Math.floor(x/60/60))*60) + ' мин. ';  
x = (((x/60/60 - Math.floor(x/60/60))*60) - Math.floor((x/60/60 - Math.floor(x/60/60))*60))*60;  
ostStr = ostStr + Math.floor(x) + ' сек. ';  
document.getElementById('x1').innerHTML = '<DIV align="center"><FONT color="#c9a82f">Час | Мин | Сек</FONT></DIV> ' + '' + ostStr;  
Timer= setTimeout("clock()",10);  
}  
clock();  
</script> <br>  
</div>


  • Страница 1 из 1
  • 1
Поиск: