Desplegar fecha actual

24/11/2003 - 22:37 por Mario Vásquez | Informe spam
Amigos!

Como puedo presentar la fecha actual en mi página, me refiero a la fecha del
servidor, no a la fecha de última modificación de la hoja

Agradezco su ayuda

Salu2
Mario
 

Leer las respuestas

#1 Palel
30/11/2003 - 12:34 | Informe spam
Puedes hacerlo con un script, por ejemplo:
___________________________________________________________________________________
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Pagina nueva 1</title>
<SCRIPT>
function tick() {
var hours, minutes, seconds, ap;
var intHours, intMinutes, intSeconds;
var today;
today = new Date();
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
if (intHours == 0) {
hours = "12:";
ap = "Medianoche";
} else if (intHours <12) {
hours = intHours+":";
ap = "A.M.";
} else if (intHours == 12) {
hours = "12:";
ap = "Mediodía";
}
else {
intHours = intHours - 12
hours = intHours + ":";
ap = "P.M.";
}
if (intMinutes <10) {
minutes = "0"+intMinutes+":";
} else {
minutes = intMinutes+":";
}
if (intSeconds <10) {
seconds = "0"+intSeconds+" ";
} else {
seconds = intSeconds+" ";
}
timeString = hours+minutes+seconds+ap;
Clock.innerHTML = timeString;
window.setTimeout("tick();", 100);
}
window.onload = tick;
</SCRIPT>

</HEAD>
<BODY background="">
<DIV id=Clock
style="COLOR: #0000ff; FONT-FAMILY: Arial; FONT-SIZE: 30px; FONT-WEIGHT: bolder"
aling="left"></DIV>

<body>

</body>

</html>
_________________________________________________________________________________________
Saludos, Palel
[MS MVP]
http://www.infonegocio.com/luzylar/informatica.htm
®El Rincón del Navegante - http://www.luzylar.com

*** Consulta en el Foro específico:
news://msnews.microsoft.com/microso...lic.es.ie6
news://msnews.microsoft.com/microso...ookexpress
news://msnews.microsoft.com/microso....windows98
news://msnews.microsoft.com/microso....windowsxp

... hay más, busca el que necesites.
_____________________________________________________
"Mario Vásquez" escribió en el mensaje news:
| Amigos!
|
| Como puedo presentar la fecha actual en mi página, me refiero a la fecha del
| servidor, no a la fecha de última modificación de la hoja
|
| Agradezco su ayuda
|
| Salu2
| Mario
|
|

Preguntas similares