Hallo, ik wil graag voor een website die ik aan het maken ben, de tijdverschillen van australie in de statusbar weergeven.. Ik heb alleen geen flauw idee hoe ik dat moet doen! Ik heb van een andere site een javascript gejat waarmee ik de tijden helemaal bovenaan weergeef. Ik ben dus op zoek naar een site die hetzelfde doet maar dan op de statusbar.. Kan iemand mij daaraan helpen?
Deze javascript heb ik nu:
Ik hoop dat iemand mij kan helpen, (en dat de script goed overkomt..)
Deze javascript heb ik nu:
JavaScript:
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
62
63
| <script language=javaScript> <!-- Beginning of JavaScript - var hours var shifthours var minutes var seconds var localhours var pause=2000 var thisplace var i_worldtime=0 var timer var worldtime = new Array() worldtime[1]="Brisbane,10" worldtime[3]="Melbourne,11" worldtime[2]="Perth,8" worldtime[5]="Sydney,11" worldtime[0]="Amsterdam,1" worldtime[6]="Cairns,10" worldtime[4]="Broome,8" function showtime() { if (document.all) { thisplace=worldtime[i_worldtime].split(",") thistime= new Date() hours=thistime.getUTCHours() hours=eval(hours) shifthours=eval(thisplace[1]) localhours=eval(shifthours+hours) if (localhours <0) {localhours=24+localhours} if (localhours >=24) {localhours=localhours-24} minutes=thistime.getUTCMinutes() seconds=thistime.getUTCSeconds() if (thisplace[0]=='Delhi') { minutes=eval(minutes+30) if (minutes>=60) { minutes=eval(minutes-60) localhours=eval(localhours+1) } } if (eval(minutes) < 10) {minutes="0"+minutes} if (eval(seconds) < 10) {seconds="0"+seconds} if (eval(localhours) < 10) {localhours="0"+localhours} thistime = localhours+":"+minutes+":"+seconds document.title="Het is nu "+thistime+" uur in "+thisplace[0]+"" i_worldtime++ if (i_worldtime>=worldtime.length) { i_worldtime=0 } timer =setTimeout("showtime()",pause) } } if (document.all) { window.onload=showtime } // - End of JavaScript - --> </script> |
Ik hoop dat iemand mij kan helpen, (en dat de script goed overkomt..)