Admin Admin
Number of posts : 262 Join date : 08.03.12 Age : 62 Dzīvesvieta : Talsi
| Tēma: Līdz Jaunajam gadam sekundes... Ceturtdiena Oktobris 11, 2012 8:18 pm | |
| Skriptu var likt kur grib - Kods:
-
<center>Līdz Jaunajam gadam vēl ir:</center><br> <SCRIPT language="JavaScript" type="text/javascript"> function fulltime () { var time=new Date(); var newYear=new Date("jan,1,2012,00:00:00"); var totalRemains=(newYear.getTime()-time.getTime());
if (totalRemains>1){
var RemainsSec = (parseInt(totalRemains/1000)); var RemainsFullDays=(parseInt(RemainsSec)); var secInLastDay=RemainsSec-RemainsFullDays*24*3600; var RemainsFullHours=(parseInt(secInLastDay/3600)); if (RemainsFullHours<10){RemainsFullHours="0"+RemainsFullHours}; var secInLastHour=secInLastDay-RemainsFullHours*3600; var RemainsMinutes=(parseInt(secInLastHour/60)); if (RemainsMinutes<10){RemainsMinutes="0"+RemainsMinutes}; var lastSec=secInLastHour-RemainsMinutes*60; if (lastSec<10){lastSec="0"+lastSec};
document.getElementById("RemainsFullDays").innerHTML=RemainsFullDays+" sekundes"; setTimeout('fulltime()',10) }
else{ document.getElementById("clock").innerHTML="Laimīgu Jauno 2012.gadu!!"; } } </SCRIPT>
<body> <div align="center"><span id="clock"></div> <div align="center"><b><span id="RemainsFullDays"></span></b></div><br> </span>
<SCRIPT language=JavaScript>fulltime();</SCRIPT> | |
|