Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/04/2007, 08:16
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años
Puntos: 772
Re: Textarea y Date

Hola lopmorjo

Prueba este ejemplo:

Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
horas() {
  
hora = new Date();
  
hora.getHours();
  
hora.getMinutes();
  if (
m<10'0'm;
  
hora.getSeconds();
  if (
s<10'0's;
  return (
h+':'+m+':'+s);
}
</script>
</head>
<body>
<form>
<textarea name="txt"></textarea>
<input type="button" value="Hora" onclick = "txt.value = horas()" />
</form>
</body>
</html> 
Saludos,