Script countdown to the event ucoz - UcozBaze All Scripts And Templates
  
Page 1 of 11
UcozBaze All Scripts And Templates » Scripts and Coding » Other » Script countdown to the event ucoz (Script countdown to the event ucoz)
Script countdown to the event ucoz
interoutDate: Tuesday, 2012-09-11, 9:56 PM | Message # 1
Group: Administrators
Messages: 1021
33


Installation:

We put to where we want to see:


Code
<script language='javascript' type='text/javascript'>   
   function fulltime () {   
var time=new Date();   
var newYear=new Date("jan,01,2013,00:00:00");   
var totalRemains=(newYear.getTime()-time.getTime());   

if (totalRemains>1){   

var RemainsSec = (parseInt(totalRemains/1000));   
var RemainsFullDays=(parseInt(RemainsSec/(24*60*60)));   
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+"<span id='Rem'> Days</span>";   
document.getElementById("RemainsFullHours").innerHTML=RemainsFullHours+"<span id='Rem'> H </span>";   
document.getElementById("RemainsMinutes").innerHTML=RemainsMinutes+"<span id='Rem'>Min</span>";   
document.getElementById("lastSec").innerHTML=lastSec+"<span id='Rem'> Sec</span>";   
setTimeout('fulltime()',10)   
}   

else{   
document.getElementById("clock").innerHTML="C НОВЫМ ГОДОМ !!!";   
}   
}   
</script>   
<style type='text/css'>   
   #clou_xs {position:relative;width:200px;height:150px;padding:10px;}   
   #clock {height:150px;text-align:center;font-size:13px;}   
   #RemainsFullDays {position:absolute;top:50%;left:40%;font-size:25px;}   
   #RemainsFullHours {position:absolute;bottom:1px;left:40px;font-size:15px;}   
   #RemainsMinutes {position:absolute;bottom:1px;left:87px;font-size:15px;}   
   #lastSec {position:absolute;bottom:1px;left:135px;font-size:15px;}   
   #Rem {font-size:11px;font-weight:normal;}   
</style>   
<div id='clou_xs'>   
<div id='clock'>   
   Left until the new year:  

<span id='RemainsFullDays'></span>   
   <span id='RemainsFullHours'></span>   
   <span id='RemainsMinutes'></span>   
   <span id='lastSec'></span>   
</div>   
</div>   
<script language='javascript'>fulltime();</script>



Change date here:


Code
var newYear=new Date("jan,01,2013,00:00:00");  



 
Message


Installation:

We put to where we want to see:


Code
<script language='javascript' type='text/javascript'>   
   function fulltime () {   
var time=new Date();   
var newYear=new Date("jan,01,2013,00:00:00");   
var totalRemains=(newYear.getTime()-time.getTime());   

if (totalRemains>1){   

var RemainsSec = (parseInt(totalRemains/1000));   
var RemainsFullDays=(parseInt(RemainsSec/(24*60*60)));   
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+"<span id='Rem'> Days</span>";   
document.getElementById("RemainsFullHours").innerHTML=RemainsFullHours+"<span id='Rem'> H </span>";   
document.getElementById("RemainsMinutes").innerHTML=RemainsMinutes+"<span id='Rem'>Min</span>";   
document.getElementById("lastSec").innerHTML=lastSec+"<span id='Rem'> Sec</span>";   
setTimeout('fulltime()',10)   
}   

else{   
document.getElementById("clock").innerHTML="C НОВЫМ ГОДОМ !!!";   
}   
}   
</script>   
<style type='text/css'>   
   #clou_xs {position:relative;width:200px;height:150px;padding:10px;}   
   #clock {height:150px;text-align:center;font-size:13px;}   
   #RemainsFullDays {position:absolute;top:50%;left:40%;font-size:25px;}   
   #RemainsFullHours {position:absolute;bottom:1px;left:40px;font-size:15px;}   
   #RemainsMinutes {position:absolute;bottom:1px;left:87px;font-size:15px;}   
   #lastSec {position:absolute;bottom:1px;left:135px;font-size:15px;}   
   #Rem {font-size:11px;font-weight:normal;}   
</style>   
<div id='clou_xs'>   
<div id='clock'>   
   Left until the new year:  

<span id='RemainsFullDays'></span>   
   <span id='RemainsFullHours'></span>   
   <span id='RemainsMinutes'></span>   
   <span id='lastSec'></span>   
</div>   
</div>   
<script language='javascript'>fulltime();</script>



Change date here:


Code
var newYear=new Date("jan,01,2013,00:00:00");  


Author - interout
Date Added - 2012-09-11 в 9:56 PM
SkacikasDate: Wednesday, 2012-09-12, 10:23 AM | Message # 2
Group: Moderator
Messages: 71
2
interout, neblogas tas biggrin bet man rodos galima ir su ucoz tais gadgets ar kaip jie yra ten man rodos toks smile
 
Messageinterout, neblogas tas biggrin bet man rodos galima ir su ucoz tais gadgets ar kaip jie yra ten man rodos toks smile

Author - Skacikas
Date Added - 2012-09-12 в 10:23 AM
UcozBaze All Scripts And Templates » Scripts and Coding » Other » Script countdown to the event ucoz (Script countdown to the event ucoz)
Page 1 of 11
Search:
                                                               
Statistics Forum
New Posts Popular topic Top Forum Users New User

type list Forumo Informatorius (2)
type list Pereiti i kita puslapi forume 1.2.3. Ucoz skriptas (1)
type list The script for the output of a random video from Youtube (0)
type list The script updates the block comment without refreshing the (0)
type list Information about your browser for uCoz (0)
type list Kaip isideti Forum Online/Offline Image Ucoz ? (4)
type list Highlight the code in one click (0)
type list The original form of statistics for uCoz (0)
type list The ban on the entry of certain characters in the Input (0)
type list Clock for site ucoz (0)

type list Skaiciuojam nuo 1 iki 1000 ! (557)
type list Forum SignatureBar (60)
type list Avatars (22)
type list Kaip pakeisti paveiksla mazas? (19)
type list Juokingos Fotkes :) (19)
type list Mini-Chatas islendantis is sono ucoz (15)
type list Mp3-Tau.do.am (13)
type list Шаблон форума для ucoz For-css (12)
type list Ucoz script - favicon (11)
type list Button scrolling up ucoz (10)

interout
GoblinaS
Adi
Esquire
BAtman
WaSHkaZ
Skacikas
meskis
Gytenas
vicka

AnelsoNN
nemanjababin
defaultNick0568
mechoochite
mdcurren
yastreb
lad0s™
Lapuxa
th3kizaka
projektas420


Site design by uCozBaze
uCozBaze © 2011-2016