Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/05/2002, 18:47
gribuille
 
Fecha de Ingreso: mayo-2002
Mensajes: 4
Antigüedad: 21 años, 10 meses
Puntos: 0
Re: Necesito una ayudita, algun genio por alli?

Hola ARIEL 40! Espero que este código te ayude en el tema de la hora....

dentro de head

<head>
<script language="javascript">
function hora(){
fecha=new Date();
prueba.mifecha.value=(fecha.getDate()+"/"+(fecha.getMonth()+1)+"/"+fecha.getYear());
setTimeout("hora()",1000)
}
function lahora(){
minutada=new Date();
prueba.mifecha.value=(minutada.getHours()+":& quot;+(minutada.getMinutes()<10?"0"+m inutada.getMinutes():minutada.getMinutes())+" :"+(minutada.getSeconds()<10?"0" +minutada.getSeconds():minutada.getSeconds()));
setTimeout("lahora()",1000)
}
</script>
</head>

esto dentro del body...

<body onload="hora(),lahora()">
<form name="prueba">
<input type="text" name="mifecha">
</form>
</body>

La posición o colocación sólo la puedes solucionar con tablas...
Este segundo código que te envio es para colocar la fecha completa....

<head>
<script language="javascript">
function fechatotal(){
a=new Array("Lunes","Martes","M iercoles","Jueves","Viernes&qu ot;,"Sabado","Domingo");
b=new Date();
c=new Array("","Enero","Febrero ","Marzo","Abril","M ayo","Junio","Julio",&quo t;Agosto"
,"Septiembre","Octubre"," Noviembre","Diciembre");
prueba.mifecha.value=(a[b.getDay()-1]+" , "+b.getDate()+" de "+c[b.getMonth()+1]+" del "+b.getYear());
}
</script>
</head>

<body bgcolor="#00ffff" text="#000000" link="#408080" vlink="#8000ff" alink="#400040" onload="fechatotal()">
<form name="prueba">
<input type="text" name="mifecha" size="50">
</form>
</body>

Estos códigos son de cortar y pegar. ¿ok?
Saludos...