Numaratoare inversa personalizata!
Forum gratuit: forum de suport al utilizatorilor :: Forum de suport :: Alte probleme :: Arhiva probleme diverse
Pagina 1 din 2 • Distribuiţi
Pagina 1 din 2 • 1, 2
Numaratoare inversa personalizata!
Stie careva cum pot face in genu? Chiar asa? :-s .Am nevoie de un cod asemanator pana maine la ora 2 ..daca se poate va rog frumos!
Ultima editare efectuata de catre SASAN. in Mar Mai 08, 2012 11:18 pm, editata de 1 ori
Re: Numaratoare inversa personalizata!
Salutare.
Incercati acest script:
Editati linia dateFuture = new Date(2012,10,28,21,30,00);
Asa deci:
2012 - anul; 10 - luna; 28 - ziua; 21 - ora; 30 - minuta; 00) - secunda.
Modificati aceste date, dupa cand doriti sa expire numaratoarea inversa...
Incercati acest script:
- Cod:
<style type="text/css">
<!--
A:link { text-decoration: none; color: #616161; }
A:visited { text-decoration: none; color: #616161; }
A:active { text-decoration: none; color: #616161; }
A:hover { text-shadow: 0px 0px 5px red; cursor: defoult; color: black; }
-->
</style>
<font face="Century Gothic" size="4"><em><strong><font color="#ffd801">Timp ramas<a href="#"><font color="#fffff"><SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!--
dateFuture = new Date(2012,10,28,21,30,00);
function GetCount(){
dateNow = new Date(); //grab current date
amount = dateFuture.getTime() - dateNow.getTime(); //calc milliseconds between dates
delete dateNow;
// time is already past
if(amount < 0){
document.getElementById('countbox').innerHTML="Timp Expirat";
}
// date is still good
else{
days=0;hours=0;mins=0;secs=0;out="";
amount = Math.floor(amount/1000);//kill the "milliseconds" so just secs
days=Math.floor(amount/86400);//days
amount=amount%86400;
hours=Math.floor(amount/3600);//hours
amount=amount%3600;
mins=Math.floor(amount/60);//minutes
amount=amount%60;
secs=Math.floor(amount);//seconds
if(days != 0){out += days +" day"+((days!=1)?"s":"")+", ";}
if(days != 0 || hours != 0){out += hours +" hour"+((hours!=1)?"s":"")+", ";}
if(days != 0 || hours != 0 || mins != 0){out += mins +" minute"+((mins!=1)?"s":"")+", ";}
out += secs +" seconds";
document.getElementById('countbox').innerHTML=out;
setTimeout("GetCount()", 1000);
}
}
window.onload=function(){GetCount();}//call when everything has loaded
//-->
</script><div id="countbox"></div></font>
Editati linia dateFuture = new Date(2012,10,28,21,30,00);
Asa deci:
2012 - anul; 10 - luna; 28 - ziua; 21 - ora; 30 - minuta; 00) - secunda.
Modificati aceste date, dupa cand doriti sa expire numaratoarea inversa...
Re: Numaratoare inversa personalizata!
Multumesc L! Sa il pun intr-un border ceva pot?
Totusi e ceva gresit la cod,poti sa te uiti putin pe forum,sa vezi cum arata )
Totusi e ceva gresit la cod,poti sa te uiti putin pe forum,sa vezi cum arata )
Re: Numaratoare inversa personalizata!
Poftim:
- Cod:
<style type="text/css">
<!--
A:link { text-decoration: none; color: #616161; }
A:visited { text-decoration: none; color: #616161; }
A:active { text-decoration: none; color: #616161; }
A:hover { text-shadow: 0px 0px 5px red; cursor: defoult; color: black; }
-->
</style>
<font face="Century Gothic" size="4"><em><strong><font color="#ffd801">Timp ramas<a href="#"><font color="#fffff"><SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!--
dateFuture = new Date(2012,10,28,21,30,00);
function GetCount(){
dateNow = new Date(); //grab current date
amount = dateFuture.getTime() - dateNow.getTime(); //calc milliseconds between dates
delete dateNow;
// time is already past
if(amount < 0){
document.getElementById('countbox').innerHTML="Timp Expirat";
}
// date is still good
else{
days=0;hours=0;mins=0;secs=0;out="";
amount = Math.floor(amount/1000);//kill the "milliseconds" so just secs
days=Math.floor(amount/86400);//days
amount=amount%86400;
hours=Math.floor(amount/3600);//hours
amount=amount%3600;
mins=Math.floor(amount/60);//minutes
amount=amount%60;
secs=Math.floor(amount);//seconds
if(days != 0){out += days +" zi"+((days!=1)?"s":"")+", ";}
if(days != 0 || hours != 0){out += hours +" ora"+((hours!=1)?"s":"")+", ";}
if(days != 0 || hours != 0 || mins != 0){out += mins +" minut"+((mins!=1)?"s":"")+", ";}
out += secs +" secunde";
document.getElementById('countbox').innerHTML=out;
setTimeout("GetCount()", 1000);
}
}
window.onload=function(){GetCount();}//call when everything has loaded
//-->
</script><div id="countbox"></div></font>
Re: Numaratoare inversa personalizata!
Tot asa apare.. trebuie adaugat in CSS sau Generalitati? ca in Generalitati l-am adaugat.
Re: Numaratoare inversa personalizata!
Clar ca in Generalitati. Ar trebui sa faceti diferenta dintre codurile HTML si CSS. La ce va referiti mai exact prin "tot asa"?
Re: Numaratoare inversa personalizata!
Pai m-am uitat prin el,si sunt cateva coduri html,css si javascript;am crezut ca l-am adaugat eu prost.
Ca inainte,cu scrisul mare in tot forumul (dezordonat)! Daca ai altu mai personalizat ar fii ok :">
Ca inainte,cu scrisul mare in tot forumul (dezordonat)! Daca ai altu mai personalizat ar fii ok :">
Re: Numaratoare inversa personalizata!
Ok, folositi acest cod:
- Cod:
Timp ramas<script type="text/javascript" language="JavaScript">
<!--
dateFuture = new Date(2012,10,28,21,30,00);
function GetCount(){
dateNow = new Date(); //grab current date
amount = dateFuture.getTime() - dateNow.getTime(); //calc milliseconds between dates
delete dateNow;
// time is already past
if(amount < 0){
document.getElementById('countbox').innerHTML="Timp Expirat";
}
// date is still good
else{
days=0;hours=0;mins=0;secs=0;out="";
amount = Math.floor(amount/1000);//kill the "milliseconds" so just secs
days=Math.floor(amount/86400);//days
amount=amount%86400;
hours=Math.floor(amount/3600);//hours
amount=amount%3600;
mins=Math.floor(amount/60);//minutes
amount=amount%60;
secs=Math.floor(amount);//seconds
if(days != 0){out += days +" zi"+((days!=1)?"s":"")+", ";}
if(days != 0 || hours != 0){out += hours +" ora"+((hours!=1)?"s":"")+", ";}
if(days != 0 || hours != 0 || mins != 0){out += mins +" minut"+((mins!=1)?"s":"")+", ";}
out += secs +" secunde";
document.getElementById('countbox').innerHTML=out;
setTimeout("GetCount()", 1000);
}
}
window.onload=function(){GetCount();}//call when everything has loaded
//-->
</script><div id="countbox"></div>
Re: Numaratoare inversa personalizata!
Tot nu inteleg cum sa fac asta: dateFuture = new Date(2012,5,9,21,30,00);
Meciul este maine la ora 21:45 ,mie imi arata:
31 zile, 22 ore, 17 minutte, 1 secunde
Meciul este maine la ora 21:45 ,mie imi arata:
31 zile, 22 ore, 17 minutte, 1 secunde
Re: Numaratoare inversa personalizata!
Pai modificati linia astfel:
- Cod:
dateFuture = new Date(2012,05,09,21,45,00);
Re: Numaratoare inversa personalizata!
Cu placere.
Pagina 1 din 2 • 1, 2
Subiecte similare
» Numaratoare inversa
» Cod pentru numărătoare inversă
» Script '' Numaratoare inversa pana la Craciun''
» Problema script numaratoare inversa pana la craciun
» numaratoare de vizitatori pe forum
» Cod pentru numărătoare inversă
» Script '' Numaratoare inversa pana la Craciun''
» Problema script numaratoare inversa pana la craciun
» numaratoare de vizitatori pe forum
Forum gratuit: forum de suport al utilizatorilor :: Forum de suport :: Alte probleme :: Arhiva probleme diverse
Pagina 1 din 2
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum