Czyli zostalo 3h32min do konca dnia
nie wiem czemu nie chce dzialac, biala stronba sie pojawia
<script> function liczCzas() { now = new Date(); rok = now.getFullYear(); miesiac = now.getMonth(); dzien = now.getDate(); to = new Date(rok,miesiac,dzien,12,0,0); ile = to.getTime() - now.getTime(); godzin = Math.floor(ile / (1000 * 60 * 60)); minut = Math.floor( ile / (1000 * 60)-godzin*60); sekund = Math.floor(ile / 1000 - godzin*60*60 - minut*60); if (godzin < 0) { to = new Date(rok,miesiac,dzien+1,12,0,0); ile = to.getTime() - now.getTime(); godzin = Math.floor(ile / (1000 * 60 * 60)); minut = Math.floor(ile / (1000 * 60)-godzin*60); sekund = Math.floor(ile / 1000 - godzin*60*60 - minut*60); } document.getElementById("time").innerHTML = "Pozostalo: "+godzin+" ... godzin, "+minut+" minut, "+sekund+" sekund"; } var animeInt; clearInterval(animeInt); animeInt = setInterval("liczCzas()", 1000); </script> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> </head> <body> </body> </html>