Navigation

 

Il suffit de recopier dans la page, entre <head> et</head >, le texte suivant  par un "copier coller" :

<script language="Javascript">
var timerID=null
var timerRunning=false
function stopclock(){
if (timerRunning)
    clearTimeOut(timerID)
    timerRunning=false
}
function startclock(){
stopclock()
    showtime()
}
   
function showtime(){
var now=new Date()
var hours= now.getHours()
var minutes=now.getMinutes()
var secondes=now.getSeconds()
var timeValue=""+((hours <10)? "0" : "")+hours
timeValue += ((minutes <10)?":0":":")+minutes
timeValue += ((secondes <10)?":0":":")+secondes
timeValue =" "+timeValue
document.
face.clock.value=timeValue
    timerId=setTimeout("showtime()",1000)
    timerRunning=true
}   
</script>

Dans <Body... rajouter :

onload="startclock()"

Puis entre <Body... et </Body> un formulaire appelé "face" :

<form name="face">
<p><input type="text" size="7" name="
clock" value="chargement..."></p>
</form>

 

Retour au début