snake.logan
Hallo!
Ich suche irgendwie einen Countdown der Jahre, Monate, Wochen, Tage, Stunden, Minuten und Sekunden Zählen kann. Irgendwie weiß ich nicht warum ich sowas selber nicht Programmieren kann. Ich finde es aber nirgendswo im Internet. Könnt Ihr mir helfen?
Taz
Der war gut
Aber ich bin ja auch kein unmensch, hier direkt mal ein Countdown Script:
| code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Countdown</title>
<script type="text/javascript">
/**
* Hier das gewünschte Datum eingeben.
* Doc: http://de.selfhtml.org/javascript/objekte/date.htm#allgemeines
*/
var eventdate = new Date("June 9, 2006");
function to_string(n) {
var s = '';
if(n < 10) n += '0'
return s + n.toString();
}
function countdown() {
cl = document.clock;
d = new Date();
count = Math.floor((eventdate.getTime() - d.getTime()) / 1000);
if(count <= 0) {
cl.days.value = '----';
cl.hours.value = '--';
cl.mins.value = '--';
cl.secs.value = '--';
return;
}
cl.secs.value = to_string(count % 60);
count = Math.floor(count / 60);
cl.mins.value = to_string(count % 60);
count = Math.floor(count / 60);
cl.hours.value = to_string(count % 24);
count = Math.floor(count / 24);
cl.days.value = count;
setTimeout ("countdown()", 1000);
}
</script>
</head>
<body onLoad="countdown()">
<form name="clock">
<table border="3">
<tr>
<td>Tage:</td>
<td>Stunden:</td>
<td>Minuten:</td>
<td>Sekunden:</td>
</tr>
<tr>
<td><input size="3" name="days" type="text"></td>
<td><input size="2" name="hours"type="text"></td>
<td><input size="2" name="mins" type="text"></td>
<td><input size="2" name="secs" type="text"></td>
</tr>
</table>
</form>
</body>
</html> |
|
ZeitenWandel
Besser einmal mehr als einmal weniger

VIoelleicht übersieht man den Code ja auf der Page!
Taz
doppelt gemoppelt hält besser
ZeitenWandel
Du wolltest doch nur den Post haben, gebs zu :P
snake.logan
nö! ich brauchte n ur countdown!
ZeitenWandel
Ich meinte auch Taz, nicht dich
ok, b2t!
Klappts?
Elrond
Ihr 2 seid'S mir ja wieder