Hallo,
Kann mir jemand sagen was ich am untenstehenden Code ändern muss das das ganze auch auf Firefox dargestellt wird?
Das wäre super.
<body onload="countdown()" ;>
<SPAN id=c1 style="FONT: bold 24px verdana; COLOR: Black"></SPAN><BR>
<SPAN id=c2 style="FONT: bold 22px verdana; COLOR: red">;</SPAN><br>
<b><font size="5">bis zur FASNET</b>
<script type="text/javascript">
// verander hieronder de datum waarnaar afgeteld moet worden
var end = new Date("November 11, 2008 11:11:11 GMT");
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;
c1.innerText = days + ' Tage';
c2.innerText = hours + ':' + minutes + ':' + seconds + '.' + miliseconds + '';
setTimeout("countdown()", 50);
}
}
</script>
Kann mir jemand sagen was ich am untenstehenden Code ändern muss das das ganze auch auf Firefox dargestellt wird?
Das wäre super.
<body onload="countdown()" ;>
<SPAN id=c1 style="FONT: bold 24px verdana; COLOR: Black"></SPAN><BR>
<SPAN id=c2 style="FONT: bold 22px verdana; COLOR: red">;</SPAN><br>
<b><font size="5">bis zur FASNET</b>
<script type="text/javascript">
// verander hieronder de datum waarnaar afgeteld moet worden
var end = new Date("November 11, 2008 11:11:11 GMT");
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;
c1.innerText = days + ' Tage';
c2.innerText = hours + ':' + minutes + ':' + seconds + '.' + miliseconds + '';
setTimeout("countdown()", 50);
}
}
</script>