Hallo,
ich möchte einen Countdown für meine Hochzeit erstellen. Jetzt sieht der Counter so aus:
73 Tage
06:32
bis zum 20 August 2008 / 15:00 Uhr
Nun möchte ich aber auch hinter der "06" Stunden stehen haben und hinter der "32" Minuten.
Das ist was ich schon habe:
<div align=center>
<SPAN id=c1 style="FONT: bold 30px arial; COLOR: green;"></SPAN>
<SPAN id=c2 style="FONT: bold 25px arial; COLOR: blue;">;</SPAN>
...bis zum 20 August 2008 / 15:00 Uhr
</div>
<script type='text/javascript'>
// Erstellt mit dem Countdown-Generator - Homepage-Total.de
var end = new Date('August 20, 2008 15:00:00');
function toSt2(n) {
s = '';
if (n < 10) s += '0';
return (s + n).toString();
}
function toSt3(n) {
s = '';
if (n < 10) s += '00';
else if (n < 100) s += '0';
return (s + n).toString();
}
function countdown() {
d = new Date();
count = Math.floor(end.getTime() - d.getTime());
if(count > 0) {
miliseconds = toSt3(count%1000); count = Math.floor(count/1000);
seconds = toSt2(count%60); count = Math.floor(count/60);
minutes = toSt2(count%60); count = Math.floor(count/60);
hours = toSt2(count%24); count = Math.floor(count/24);
days = count;
document.getElementById('c1').innerHTML = days + ' TAGE';
document.getElementById('c2').innerHTML = hours + ':' + minutes
setTimeout('countdown()', 100);
}
}
countdown();
</script>
Ich danke euch schonmal für eure Hilfe!