function zweistellig(n) hast Du zweimal, benenne das eine mal um!
Hallo!
Ich möchte 2 Countdown-Scripte haben, jedoch hab ich ein Problem und zwar dass die 2 Countdowns nicht angzeigt werden. Es wird immer nur einer angezeigt.
Mit: <span id="tag">0</span> wird dann der Countdown ausgegeben.Code:<script language="JavaScript" type="text/javascript"> <!-- var eventdate = new Date(2006, 5, 10, 0, 0, 0); function zweistellig(n) { s="" if(n<10) s+="0" return s+n.toString(); } function countdown() { d=new Date(); count=Math.floor((eventdate.getTime()-d.getTime())/1000); if(count<=0){ days.value ="----"; hours.value="--"; mins.value="--"; secs.value="--"; return; } secs=zweistellig(count%60); count=Math.floor(count/60); mins=zweistellig(count%60); count=Math.floor(count/60); hours=zweistellig(count%24); count=Math.floor(count/24); days=count; document.getElementById("tag").firstChild.data = days; setTimeout("countdown()", 1000); } --> </script>
2. Coundtown:
<span id="tag2">0</span>Code:<script language="JavaScript" type="text/javascript"> <!-- var eventdate = new Date(2006, 5, 12, 0, 0, 0); function zweistellig(n) { s="" if(n<10) s+="0" return s+n.toString(); } function countdown2() { d=new Date(); count=Math.floor((eventdate.getTime()-d.getTime())/1000); if(count<=0){ days.value ="----"; hours.value="--"; mins.value="--"; secs.value="--"; return; } secs=zweistellig(count%60); count=Math.floor(count/60); mins=zweistellig(count%60); count=Math.floor(count/60); hours=zweistellig(count%24); count=Math.floor(count/24); days=count; document.getElementById("tag2").firstChild.data = days; setTimeout("countdown2()", 1000); } --> </script>
<body onload="countdown(); countdown2()">
function zweistellig(n) hast Du zweimal, benenne das eine mal um!
[321 Name="Joe"]
wie immer, lieber gleich mit notepad, dem Editor meines Vertrauens
[/321]
use my HTML-Tester
Motto'06: Mut zur deutschen Sprache!
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)