Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/02/2008, 22:14
Avatar de marcopoloaz06
marcopoloaz06
 
Fecha de Ingreso: julio-2007
Ubicación: México
Mensajes: 457
Antigüedad: 17 años, 7 meses
Puntos: 11
Re: Duda con document. en script [Novato]

hola, ve
Código HTML:
<script type="text/javascript">d=document;

var Hoy = new Date("<?php echo date("d M Y G:i:s");?>");
function Reloj(){
Hora = Hoy.getHours()
Minutos = Hoy.getMinutes()
Segundos = Hoy.getSeconds()
if (Hora<=9) Hora = "0" + Hora
if (Minutos<=9) Minutos = "0" + Minutos
if (Segundos<=9) Segundos = "0" + Segundos
Hoy.setSeconds(Hoy.getSeconds() +1)

mostrarhora = Hora + ":" + Minutos + ":" + Segundos;
document.getElementById("form_reloj").innerHTML=mostrarhora;
}

setInterval(Reloj,1000);

</script> 
y

Código HTML:
<span id="form_reloj" style="position:relative;"></span> 
y si quieres aprender más

www.librosweb.es

Adios...
__________________
Aerolíneas Alicia :D