Heure simple
Codes à insérer sur la ligne <BODY> Exemple: <BODY onload="startclock()">
onload="startclock()" Cliquez ici pour tout sélectionner
Codes à insérer entre les balises <HEAD> et </HEAD> de votre document HTML
<script language="JavaScript"><!-- // Helpers for JSI page... // Netscapes Clock - Start // this code was taken from Netscapes JavaScript documentation at // www.netscape.com on Jan.25.96 var timerID = null; var timerRunning = false; function stopclock (){ if(timerRunning) clearTimeout(timerID); timerRunning = false; } function startclock () { // Make sure the clock is stopped stopclock(); showtime(); } function showtime () { var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds() var timeValue = " " + ((hours >23) ? hours -23 :hours) timeValue += ((minutes < 10) ? "h0" : "h") + minutes document.clock.face.value = timeValue; // you could replace the above with this // and have a clock on the status bar: // window.status = timeValue; timerID = setTimeout("showtime()",1000); timerRunning = true; } // Netscapes Clock - Stop // end Helpers // --></script> Cliquez ici pour tout sélectionner
Codes à insérer entre les balises <BODY> et </BODY> de votre document HTML
<form name="clock" onsubmit="0"> <h4 align="center"><font color="#0FF3FF"><strong><input type="text" size="5" name="face" align="left"></strong></font></h4> </form> Cliquez ici pour tout sélectionner