Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/11/2005, 20:01
Avatar de flaviovich
flaviovich
 
Fecha de Ingreso: agosto-2005
Ubicación: Lima, Peru
Mensajes: 2.951
Antigüedad: 18 años, 9 meses
Puntos: 39
Probado en IE, Opera y FF.
Código HTML:
<html>
<head>
<title>Untitled Document</title>
<script language="javascript"> 
function MostrarFecha() 
{
   var nombres_dias = new Array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado") 
   var nombres_meses = new Array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre") 

   var fecha_actual = new Date() 

   dia_mes = fecha_actual.getDate()        //dia del mes 
   dia_semana = fecha_actual.getDay()        //dia de la semana 
   mes = fecha_actual.getMonth() + 1 
   anio = fecha_actual.getYear() 

   if (anio < 100)                    //pasa el ano a 4 digitos 
      anio = '19' + anio 
   else if ( ( anio > 100 ) && ( anio < 999 ) ) {    //efecto 2000 
      var cadena_anio = new String(anio) 
      anio = '20' + cadena_anio.substring(1,3) 
   } 

   return nombres_dias[dia_semana] + ", " + dia_mes + " de " + nombres_meses[mes - 1] + " de " + anio;
}
</script>
</head> 
<body onLoad="form1.fecha.value=MostrarFecha()">
<form name="form1" method="post" action=""> 
  <input name="fecha" type="text" value="" size="30"> 
  <input name="fecha2" type="text" value="" size="30"> 
</form> 
</body>
</html> 
__________________
No repitamos temas, usemos el Motor de busquedas
Plantea bien tu problema: Ayúdanos a ayudarte.