Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/09/2008, 08:31
Avatar de Legoltaz
Legoltaz
 
Fecha de Ingreso: agosto-2008
Mensajes: 325
Antigüedad: 15 años, 9 meses
Puntos: 6
Respuesta: date en input text

Creo que lo que buscas es esto:

Código HTML:
Ver original
  1. <form name="frm">
  2. <input type="text" name="fecha" />
  3. </form>

Código JAVASCRIPT:
Ver original
  1. <script>
  2. var input = document.forms['frm']['fecha'];
  3. var ahora = new Date();
  4. var ano = ahora.getYear();
  5. var mes = ahora.getMonth();
  6. var dia = ahora.getDay();
  7. input.value = dia+'/'+mes+'/'+ano
  8. </script>