html und javascript?
Verfasst: 13.04.2004 20:17
besteht die möglichkeit, diesen code
in einem post wiederzugeben? zeigt bei mir nur
an. also html funktioniert. nur dieses verfluchte javascript nicht.
danke im voraus
Code: Alles auswählen
<html>
<head>
<title>Unbenanntes Dokument</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!--
var countDownInterval;
function countdown() {
var remseconds = 0;
var now = new Date();
var end = new Date("Apr, 15 2004 12:00");
var time = end - now;
var days = (time - (time % 86400000)) / 86400000;
time = time - (days * 86400000);
var hours = (time - (time % 3600000)) / 3600000;
time = time - (hours * 3600000);
var minutes = (time - (time % 60000)) / 60000;
time = time - (minutes * 60000);
var seconds = (time - (time % 1000)) / 1000;
if (days+hours+minutes+seconds > 0) {
if (hours < 10) hours = "0" + hours;
if (minutes < 10) minutes = "0" + minutes;
if (seconds < 10) seconds = "0" + seconds;
document.getElementById("remaining").firstChild.nodeValue = "Noch . . . " + days + " Tage " + hours + ":" + minutes + ":" + seconds;
}
else {
clearInterval(countDownInterval);
document.getElementById("remaining").firstChild.nodeValue = "-";
}
}
//-->
</SCRIPT>
</head>
<body onload="countDownInterval = setInterval('countdown()',1000);" onUnload="clearInterval(countDownInterval);">
<P ALIGN=CENTER ID="remaining" CLASS="remaining"> </P>
</body>
</html>
Code: Alles auswählen
danke im voraus