Ver Mensaje Individual
  #10 (permalink)  
Antiguo 10/09/2002, 02:12
guelan
 
Fecha de Ingreso: enero-2002
Mensajes: 60
Antigüedad: 22 años, 3 meses
Puntos: 0
Re: como agrego la fecha y hora automatica en una tabl

Yo lo he hecho sin ningun problema.
Abre un documento y pega todo este código tal cual está (que es lo que ha dicho Tunait)

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF">
<script language="javascript">
var fecha=new Date()
var anio=fecha.getYear()
if (anio < 1000)
anio+=2000
var dia=fecha.getDay()
var mes=fecha.getMonth()
var diames=fecha.getDate()
if (diames<10)
diames="0"+diames

reloj=fecha.getTime()
var listadias=new Array("Domingo","Lunes"," Martes","Miercoles","Jueves&qu ot;,"Viernes","Sabado")
var listames=new Array("Enero","Febrero"," Marzo","Abril","Mayo",&qu ot;Junio","Julio","Agosto&quot ;,"Septiembre","Octubre",&quot ;Noviembre","Diciembre")

function escribirFecha()
{
document.write(listadias[dia] + ", " + diames + " de " + listames[mes] + " del " + anio )
}

</script>


<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<script language="javascript">
escribirFecha()
</script>
</td>
</tr>
</table>
</body>
</html>