Recherche d'un java script

Statut
N'est pas ouverte pour d'autres réponses.
A

Androalphus666

ex membre
salut, je cherche un script qui donne l'heure dans plusieur pay qui suit la souris, c un truc connu si vous connaissez dite moi le svp
 

Onefive

Freddy Tougaux
Code:
Entre les tags <HEAD> et </HEAD>
-----------------------------------------------------------
 <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[0]="Azores,-1"
worldtime[1]="Baghdad,3"
worldtime[2]="Beijing,8"
worldtime[3]="Berlin,1"
worldtime[4]="Buenos Aires,-3"
worldtime[5]="Chicago,-6"
worldtime[6]="Denver,-7"
worldtime[7]="Hong Kong,8"
worldtime[8]="Honolulu,-10"
worldtime[9]="Johannesburg,2"
worldtime[10]="Kairo,2"
worldtime[11]="Lima,-5"
worldtime[12]="London,0"
worldtime[13]="Mexico City,-6"
worldtime[14]="Moscow,3"
worldtime[15]="New York,-5"
worldtime[16]="Paris,1"
worldtime[17]="Perth,8"
worldtime[18]="Rio de Janheiro,-2"
worldtime[19]="San Francisco,-8"
worldtime[20]="Sydney,11"
worldtime[21]="Tokyo,9"


function showtime() {
if (document.all) {
thisplace=worldtime[i_worldtime].split(",")
thistime= new Date()
hours=thistime.getUTCHours()
hours=eval(hours)
shifthours=eval(thisplace[1]) //lwf
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=" ------ "+thistime+" --- >>> "+thisplace[0]+" <<< ---------------------------------"
i_worldtime++ //lwf
if (i_worldtime>=worldtime.length) {
i_worldtime=0
}
timer =setTimeout("showtime()",pause)
}
}


// - End of JavaScript - -->
</script>

-------------------------------------------------------------

   Dans le tag <BODY>
-------------------------------------------------------------
 onload="showtime()"
Ca s affiche au dessus a gauche

source: http://www.le-webmestre.net/web/javascript/056.php
 

hOkX

Elite
mouai...
 
1er
OP
A

Androalphus666

ex membre
on m'avait dit que ct un truc qui suivait la souris, une sorte de cadre, o fait c pas l'horloge ronde je l'ai deja celle la lol:
www.androalphus.fr.st donc je veux un truc qui fais trop bien, enfin vous voyez lol mais surtout l'horloge avec les fuseaux ca serai bien..... si vous avez d'autre idee pour mon site pensez a moi.....

MERCI A VOUS TOUSS
 
Statut
N'est pas ouverte pour d'autres réponses.
Haut