
12/02/2002, 20:14
|
Usuario no validado | | Fecha de Ingreso: diciembre-2001 Ubicación: MERIDA
Mensajes: 498
Antigüedad: 23 años, 2 meses Puntos: 2 | |
Re: Fecha Y Hora En Mi Pagina Con este código la hora aparece en la barra de estado:
<script Language="JavaScript">
var timerID = null;
var timerRunning = false;
function stopclock (){
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function showtime () {
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
window.status = timeValue;
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
function startclock () {
stopclock();
showtime();
}
</script>
Debes colocar en la etiqueta de body, lo siguiente:
<body onLoad="startclock()">
Espero haberte ayudado.
Salu2..
Byes..
SEE YOU LATER..
:) :) :) :P
<a href="http://www.antichavez.cjb.net" target="_blank"><img src="http://usuarios.tripod.es/patria2002/lo.gif"> |