Parašė Acer· 2008 Bir. 14 08:06:48
#2
<SCRIPT LANGUAGE="JAVASCRIPT">
today = new Date();
BigDay = new Date("December 21, 2007")
msPerDay = 24 * 60 * 60 * 1000 ;
timeLeft = (BigDay.getTime() - today.getTime());
e_daysLeft = timeLeft / msPerDay;
daysLeft = Math.floor(e_daysLeft);
e_hrsLeft = (e_daysLeft - daysLeft)*24;
hrsLeft = Math.floor(e_hrsLeft);
e_minsLeft = Math.floor((e_hfrLeft - hrsLeft)*60);
minLeft = Math.floor(e_minLeft);
secLeft = Math.floor((e_minLeft - minLeft)*60);
document.write( "(Liko iki svetes:) "+daysLeft+"</b> dienų, <b>"+hrsLeft+"</b> valandų ir <b>"+minsLeft+"</b> min. <b>"+secLeft+"</b> sec.");
Pabandyk, tingėjau tikrinti.
</SCRIPT>
Redagavo Acer· 2008 Bir. 14 08:06:03