ho inserito uno script che mi visualizza un piccolo orologio digitale...
il fatto è che l'orologio si vede quando entro nel web, solamente che è fermo; segnale le 00:00:00 e nn si muove. :shock:
cosa potrei aver sbagliato??? :???:
grazie
Printable View
ho inserito uno script che mi visualizza un piccolo orologio digitale...
il fatto è che l'orologio si vede quando entro nel web, solamente che è fermo; segnale le 00:00:00 e nn si muove. :shock:
cosa potrei aver sbagliato??? :???:
grazie
Hai inserito la funzione onload nel Tag body?
Posta il codice usato per la visualizzazione dell'orologio al fine di permetterci di aiutarti con maggiore facilità. :wink:
ecco il codice:
FunCool: Usa i tag appositi per scrivere il codice sul forum.Codice HTML:<head>
<script type="text/javascript" language="JavaScript">
Pics=new Array()
Load=new Array()
for(i=0; i < 11; i++){
Pics[i]=i+".gif";
}
for(i=0; i < Pics.length; i++){
Load[i]=new Image();
Load[i].src="greendigital/"+Pics[i];
}
function imageclock(){
now=new Date();
seconds=now.getSeconds();
minutes=now.getMinutes();
hours=now.getHours();
var tme=((hours < 10)?"0"+hours:hours)+''+((minutes < 10)?"0"+minutes:minutes)+''+((seconds < 10)?"0"+seconds:seconds);
for (i=0; i < tme.length; i++){
document.images["t"+i].src="greendigital/"+tme.charAt(i)+".gif";
}
setTimeout('imageclock()',100);
}
window.onload=imageclock;
</script>
<body <table border="0" cellpadding="2" cellspacing="0" align="center">
<tr bgcolor="#000000">
<td><img name="t0" src="greendigital/10.gif" height="23" width="13" alt=""></td>
<td><img name="t1" src="greendigital/10.gif" height="23" width="13" alt=""></td>
<td><img src="greendigital/11.gif" height="23" width="3" alt=""></td>
<td><img name="t2" src="greendigital/10.gif" height="23" width="13" alt=""></td>
<td><img name="t3" src="greendigital/10.gif" height="23" width="13" alt=""></td>
<td><img src="greendigital/11.gif" height="23" width="3" alt=""></td>
<td><img name="t4" src="greendigital/10.gif" height="23" width="13" alt=""></td>
<td style="padding-right:10"><img name="t5" src="greendigital/10.gif" height="23" width="13" alt=""></td>
</tr>
</table>
</body>
cioè???
potete aiutarmi ancora???nn riesco a far partire l'orologio, e nn so il motivo...
grazie
Prova così:
P.S.: Non fare UP, usa il tasto Edita.Codice HTML:<html>
<head>
<script type="text/javascript" language="JavaScript">
Pics=new Array()
Load=new Array()
for(i=0; i < 11; i++){
Pics[i]=i+".gif";
}
for(i=0; i < Pics.length; i++){
Load[i]=new Image();
Load[i].src="greendigital/"+Pics[i];
}
function imageclock(){
now=new Date();
seconds=now.getSeconds();
minutes=now.getMinutes();
hours=now.getHours();
var tme=((hours < 10)?"0"+hours:hours)+''+((minutes < 10)?"0"+minutes:minutes)+''+((seconds < 10)?"0"+seconds:seconds);
for (i=0; i < tme.length; i++){
document.images["t"+i].src="greendigital/"+tme.charAt(i)+".gif";
}
setTimeout('imageclock()',1000);
}
window.onload=imageclock();
</script>
</head>
<body>
<table border="0" cellpadding="2" cellspacing="0" align="center">
<tr bgcolor="#000000">
<td><img name="t0" src="greendigital/10.gif" height="23" width="13" alt=""></td>
<td><img name="t1" src="greendigital/10.gif" height="23" width="13" alt=""></td>
<td><img src="greendigital/11.gif" height="23" width="3" alt=""></td>
<td><img name="t2" src="greendigital/10.gif" height="23" width="13" alt=""></td>
<td><img name="t3" src="greendigital/10.gif" height="23" width="13" alt=""></td>
<td><img src="greendigital/11.gif" height="23" width="3" alt=""></td>
<td><img name="t4" src="greendigital/10.gif" height="23" width="13" alt=""></td>
<td style="padding-right:10"><img name="t5" src="greendigital/10.gif" height="23" width="13" alt=""></td>
</tr>
</table>
</body>
<html>
P.P.S.: Quando scrivi del codice HTML sul mettilo tra i tag [HTML] e [/HTML], per il PHP [PHP] e [/PHP] e per altri codici [CODE] e [/CODE].
ciao a tutti...vorrei avere qualche consiglio su come inserire un orologio in una pagina dato che anche se ho inserito diversi script, l'orologio si vede ma nn cammina.
grazie