• Regolamento Macrocategoria DEV
    Prima di aprire un topic nella Macrocategoria DEV, è bene leggerne il suo regolamento. Sei un'azienda o un hosting/provider? Qui sono anche contenute informazioni per collaborare con Sciax2 ed ottenere l'accredito nella nostra community!

[Prob. Risolto] cerko kontro alla rovescia per siti web (altervista o forumfree!)

Stato
Discussione chiusa ad ulteriori risposte.

@ngi

Utente Normale
Autore del topic
5 Aprile 2008
88
0
Miglior risposta
0
ciao raga! mi potete dare qualkosa per far fare il konto alla rovescia in un sito web? altervista o forumfree? pf!
 
ecco tieni:

<script>
var dayPARAM0 = 28;
var dayPARAM1 = 10;
var dayPARAM2 = "Annual";
var dayPARAM3 = "Stagione 2003/04";

var dayNO10DATE = 0;
var dayNO100DATE = 0;
var dayNO1000DATE = 0;
var dayNOW = new Date();
var dayANNUAL;

(dayPARAM2 == "Annual") ? dayANNUAL = true : dayANNUAL = false;
if ((dayPARAM1 == dayNOW.getMonth()) && (dayPARAM0 == dayNOW.getDate()) && ((dayPARAM2 == dayNOW.getFullYear()) || (dayANNUAL == true))) {
document.write('<table width=278 cellpadding=0 cellspacing=0 border=0><tr><td><img src="http://pic.geocities.com/it/i/geo/ao/day/today_top_278x68.gif" width=278 height=68></td></tr>');
document.write('<tr><td><table width=278 cellpadding=0 cellspacing=0 border=0><tr><td bgcolor="#000000"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=2 height=2></td><td bgcolor="#ffffff" valign="top"><table width=180 cellpadding=0 border=0 cellspacing=0><tr><td><font face="Arial,helvetica" size=2> it\'s</font></td></tr>');
document.write('<tr><td align="center"><font face="arial,helvetica" size=4><b>' + dayPARAM3 + '</b></font></td></tr></table></td><td bgcolor="#ffffff"><img src="http://pic.geocities.com/it/i/geo/ao/day/below_right_96x60.gif" width=96 height=60></td></tr></table></td></tr>');
document.write('<tr><td><map name="dayBOTTOM"><area shape="rect" coords="0,0,139,40" href="http://it.geocities.yahoo.com/v/ao/day/" target="new"><area shape="rect" coords="139,0,278,40" href="http://it.calendar.yahoo.com/yc/it/" target="new"></map><img src="http://pic.geocities.com/it/i/geo/ao/day/bottom_278x40.gif" width=278 height=40 border=0 usemap="#dayBOTTOM"></td></tr></table>');
}
else {
if (dayANNUAL != true) {
var dayBIGDAY = new Date(dayPARAM2, dayPARAM1, dayPARAM0);
}
else {
var dayBIGDAY = new Date(dayNOW.getFullYear(), dayPARAM1, dayPARAM0);
if (dayBIGDAY < dayNOW) dayBIGDAY.setFullYear(dayBIGDAY.getFullYear() + 1);
}

document.write('<table width=278 cellpadding=0 cellspacing=0 border=0><tr><td colspan=4><img src="http://pic.geocities.com/it/i/geo/ao/day/top_278x28.gif" width=278 height=28></td></tr><tr><td rowspan=2 valign="top" bgcolor="#336699" ><img src="http://pic.geocities.com/it/i/geo/ao/day/left_46x37.gif" width=46 height=37></td><td rowspan=2 valign="top" align="left" bgcolor="#336699">');
Math.abs(dayBIGDAY - dayNOW) > 86400000000 ? document.write('<img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=11 height=18 vspace=7 name="dayDAY0">') : dayNO1000DATE = 1;
Math.abs(dayBIGDAY - dayNOW) > 8640000000 ? document.write('<img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=11 height=18 vspace=7 name="dayDAY1">') : dayNO100DATE = 1;
Math.abs(dayBIGDAY - dayNOW) > 864000000 ? document.write('<img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=11 height=18 vspace=7 name="dayDAY2">') : dayNO10DATE = 1;
document.write('<img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=11 height=18 vspace=7 name="dayDAY3"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" vspace=7 hspace=2 width=43 height=18 name="dayDAYS"></td>');
document.write('<td valign="top" bgcolor="#336699" align="center"><img src="http://pic.geocities.com/it/i/geo/ao/day/middle_128x21.gif" width=128 height=21></td><td rowspan=2 valign="top" bgcolor="#336699" align="right"><img src="http://pic.geocities.com/it/i/geo/ao/day/right_6x37.gif" width=6 height=37></td></tr><tr><td bgcolor="#336699" align="center" valign="top"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=3 height=8><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=8 vspace=3 name="dayDAYS0"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=8 vspace=3 name="dayDAYS1"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=8 vspace=3 name="dayDAYS2"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=8 vspace=3 name="dayDAYS3"><img src="http://pic.geocities.com/it/i/geo/ao/day/colon_5x16.gif" hspace=2 width=5 height=16><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=2><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=8 vspace=3 name="dayHRS1"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=8 vspace=3 name="dayHRS2"><img src="http://pic.geocities.com/it/i/geo/ao/day/colon_5x16.gif" width=5 height=16 hspace=9><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=8 vspace=3 name="dayMIN1"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=8 vspace=3 name="dayMIN2"><img src="http://pic.geocities.com/it/i/geo/ao/day/colon_5x16.gif" width=5 height=16 hspace=8><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=8 vspace=3 name="daySEC1"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=6 height=8 vspace=3 name="daySEC2"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=8 height=2></td></tr>');
document.write('<tr><td colspan=4><table width=278 cellpadding=0 cellspacing=0 border=0><tr><td bgcolor="#000000"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=2 height=2></td><td bgcolor="#99ccff"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=274 height=2></td><td bgcolor="#000000"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=2 height=2></td></tr></table></td></tr>');
document.write('<tr><td colspan=4><table width=278 cellpadding=0 cellspacing=0 border=0><tr><td bgcolor="#000000"><img src="http://pic.geocities.com/it/i/geo/ao/day/pixel.gif" width=2 height=2></td><td bgcolor="#ffffff" valign="top"><table width=180 cellpadding=0 border=0 cellspacing=0><tr><td><font face="Arial,helvetica" size=2> ');
(dayNOW < dayBIGDAY) ? document.write('Al') : document.write('Dal');
document.write('</font></td></tr><tr><td align="center"><font face="arial,helvetica" size=4><b>' + dayPARAM3 + '</b></font></td></tr></table></td><td bgcolor="#ffffff"><img src="http://pic.geocities.com/it/i/geo/ao/day/below_right_96x60.gif" width=96 height=60></td></tr></table></td></tr>');
document.write('<tr><td colspan=4><map name="dayBOTTOM"><area shape="rect" coords="0,0,139,40" href="http://it.geocities.yahoo.com/v/ao/day/" target="new"><area shape="rect" coords="139,0,278,40" href="http://it.calendar.yahoo.com/yc/it/" target="new"></map><img src="http://pic.geocities.com/it/i/geo/ao/day/bottom_278x40.gif" width=278 height=40 border=0 usemap="#dayBOTTOM"></td></tr></table>');
dayREFRESH();
}

function dayREFRESH(){
dayNOW = new Date();
if (dayANNUAL != true) {
var dayBIGDAY = new Date(dayPARAM2, dayPARAM1, dayPARAM0);
}
else {
var dayBIGDAY = new Date(dayNOW.getFullYear(), dayPARAM1, dayPARAM0);
if (dayBIGDAY < dayNOW) dayBIGDAY.setFullYear(dayBIGDAY.getFullYear() + 1);
}
dayCOUNTER = Math.abs(dayBIGDAY - dayNOW) / 1000;
dayDAYSUNTIL = Math.floor(dayCOUNTER / (60 * 60 * 24));
dayHOURSUNTIL = Math.floor((dayCOUNTER - (dayDAYSUNTIL * 60 * 60 * 24)) / (60 * 60));
dayMINSUNTIL = Math.floor((dayCOUNTER - ((dayDAYSUNTIL * 60 * 60 * 24) + (dayHOURSUNTIL * 60 * 60))) / 60);
daySECSUNTIL = dayCOUNTER - (dayDAYSUNTIL * 60 * 60 * 24) - (dayHOURSUNTIL * 60 * 60) - (dayMINSUNTIL * 60);
if ((dayNO1000DATE == 0) && (dayDAYSUNTIL > 999) && (document.images.dayDAY0.src != "http://pic.geocities.com/it/i/geo/ao/day/b" + Math.floor(dayDAYSUNTIL / 1000) + "_11x18.gif")) document.images.dayDAY0.src = "http://pic.geocities.com/it/i/geo/ao/day/b" + Math.floor(dayDAYSUNTIL / 1000) + "_11x18.gif";
if ((dayNO1000DATE == 0) && (dayDAYSUNTIL <= 999) && (document.images.dayDAY0.src != "http://pic.geocities.com/it/i/geo/ao/day/pixel.gif")) document.images.dayDAY0.src = "http://pic.geocities.com/it/i/geo/ao/day/pixel.gif";
if ((dayNO100DATE == 0) && (dayDAYSUNTIL > 99) && (document.images.dayDAY1.src != "http://pic.geocities.com/it/i/geo/ao/day/b" + Math.floor((dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 1000) *1000))/ 100) + "_11x18.gif")) document.images.dayDAY1.src = "http://pic.geocities.com/it/i/geo/ao/day/b" + Math.floor((dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 1000) *1000))/ 100) + "_11x18.gif";
if ((dayNO100DATE == 0) && (dayDAYSUNTIL <= 99) && (document.images.dayDAY1.src != "http://pic.geocities.com/it/i/geo/ao/day/pixel.gif")) document.images.dayDAY1.src = "http://pic.geocities.com/it/i/geo/ao/day/pixel.gif";
if ((dayNO10DATE == 0) && (dayDAYSUNTIL > 9) && (document.images.dayDAY2.src != "http://pic.geocities.com/it/i/geo/ao/day/b" + Math.floor((dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 100) *100))/ 10) + "_11x18.gif")) document.images.dayDAY2.src = "http://pic.geocities.com/it/i/geo/ao/day/b" + Math.floor((dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 100) *100))/ 10) + "_11x18.gif";
if ((dayNO10DATE == 0) && (dayDAYSUNTIL <= 9) && (document.images.dayDAY2.src != "http://pic.geocities.com/it/i/geo/ao/day/pixel.gif")) document.images.dayDAY2.src = "http://pic.geocities.com/it/i/geo/ao/day/pixel.gif";
if (document.images.dayDAY3.src != "http://pic.geocities.com/it/i/geo/ao/day/b" + (dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 10) * 10)) + "_11x18.gif") document.images.dayDAY3.src = "http://pic.geocities.com/it/i/geo/ao/day/b" + (dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 10) * 10)) + "_11x18.gif";
if ((dayDAYSUNTIL == 1) && (document.images.dayDAYS.src != "http://pic.geocities.com/it/i/geo/ao/day/day_43x18.gif")) document.images.dayDAYS.src = "http://pic.geocities.com/it/i/geo/ao/day/day_43x18.gif";
if ((dayDAYSUNTIL != 1) && (document.images.dayDAYS.src != "http://pic.geocities.com/it/i/geo/ao/day/days_43x18.gif")) document.images.dayDAYS.src = "http://pic.geocities.com/it/i/geo/ao/day/days_43x18.gif";
if (document.images.dayDAYS0.src != "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor(dayDAYSUNTIL / 1000) + "_6x8.gif") document.images.dayDAYS0.src = "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor(dayDAYSUNTIL / 1000) + "_6x8.gif";
if (document.images.dayDAYS1.src != "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor((dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 1000) *1000))/ 100) + "_6x8.gif") document.images.dayDAYS1.src = "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor((dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 1000) *1000))/ 100) + "_6x8.gif";
if (document.images.dayDAYS2.src != "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor((dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 100) *100))/ 10) + "_6x8.gif") document.images.dayDAYS2.src = "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor((dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 100) *100))/ 10) + "_6x8.gif";
if (document.images.dayDAYS3.src != "http://pic.geocities.com/it/i/geo/ao/day/s" + (dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 10) * 10)) + "_6x8.gif") document.images.dayDAYS3.src = "http://pic.geocities.com/it/i/geo/ao/day/s" + (dayDAYSUNTIL - (Math.floor(dayDAYSUNTIL / 10) * 10)) + "_6x8.gif";
if (document.images.dayHRS1.src != "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor(dayHOURSUNTIL / 10) + "_6x8.gif") document.images.dayHRS1.src = "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor(dayHOURSUNTIL / 10) + "_6x8.gif";
if (document.images.dayHRS2.src != "http://pic.geocities.com/it/i/geo/ao/day/s" + (dayHOURSUNTIL - (Math.floor(dayHOURSUNTIL / 10) * 10)) + "_6x8.gif") document.images.dayHRS2.src = "http://pic.geocities.com/it/i/geo/ao/day/s" + (dayHOURSUNTIL - (Math.floor(dayHOURSUNTIL / 10) * 10)) + "_6x8.gif";
if (document.images.dayMIN1.src != "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor(dayMINSUNTIL / 10) + "_6x8.gif") document.images.dayMIN1.src = "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor(dayMINSUNTIL / 10) + "_6x8.gif";
if (document.images.dayMIN2.src != "http://pic.geocities.com/it/i/geo/ao/day/s" + (dayMINSUNTIL - (Math.floor(dayMINSUNTIL / 10) * 10)) + "_6x8.gif") document.images.dayMIN2.src = "http://pic.geocities.com/images/gadgetfactory/day/s" + (dayMINSUNTIL - (Math.floor(dayMINSUNTIL / 10) * 10)) + "_6x8.gif";
if (document.images.daySEC1.src != "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor(daySECSUNTIL / 10) + "_6x8.gif") document.images.daySEC1.src = "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor(daySECSUNTIL / 10) + "_6x8.gif";
if (document.images.daySEC2.src != "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor(daySECSUNTIL - (Math.floor(daySECSUNTIL / 10) * 10)) + "_6x8.gif") document.images.daySEC2.src = "http://pic.geocities.com/it/i/geo/ao/day/s" + Math.floor(daySECSUNTIL - (Math.floor(daySECSUNTIL / 10) * 10)) + "_6x8.gif";
setTimeout('dayREFRESH()',1000);
}
</script>
 
no aspettate, dove devo kambiare gli spazi per fare il tempo??
 
Ciao,

Codice:
Perfavore, Entra oppure Registrati per vedere i codici!

Questo era lo script, vanno modificati i campi in rosso a tuo piacimento, ora per richiamare lo script inserisci il form:
Codice:
Perfavore, Entra oppure Registrati per vedere i codici!

Ok, niente da modificare.
Ora cambia la scrittura "<body>" con "<BODY onLoad="getTime()">"
Il tag <BODY onLoad="getTime()"> va' sostituito all'apertura del <body>, per chiuderlo chiudilo normalmente con </body>
Il form dovra' essere compreso tra i due tag <BODY onLoad="getTime()"> e </body>
:emoji_smiley:
Fonte script:
Perfavore, Entra oppure Registrati per vedere i Link!
 
E' la stessa cosa House :emoji_smiley:
Nel caso non andasse prova maiuscolo.
Ma in genere <body> e' scritto piccolo :emoji_relieved:
 
lol il linguaggio html non ha differenza tra maiuscolo o minuscolo... Comunque basta OT
 
Stato
Discussione chiusa ad ulteriori risposte.