Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/05/2011, 12:41
Avatar de leo_nqn
leo_nqn
 
Fecha de Ingreso: abril-2010
Ubicación: Neuquen
Mensajes: 461
Antigüedad: 14 años
Puntos: 24
Respuesta: script del reloj ponerlo en un input

si disculpa te pase cualquier cosa... toma.. el script te quedaria asi:

Código:
<SCRIPT>
var tick;
function stop() {
clearTimeout(tick);
}
function simple_reloj() {
var ut=new Date();
var h,m,s;
var time=" ";
h=ut.getHours();
m=ut.getMinutes();
s=ut.getSeconds();
if(s<=9) s="0"+s;
if(m<=9) m="0"+m;
if(h<=9) h="0"+h;
time+=h+":"+m+":"+s;
document.getElementById('reloj').innerHTML=time;
tick=setTimeout("simple_reloj()",1000);
document.form_reloj.relo.value=time; 
}
</SCRIPT>
y en el formulario agrega esto:

Código:
<input type="text" id="reloj" name="relo" />
lo del body dejalo como estaba.. espero te sirva saludos!
__________________

Blog: http://leonardonqn.blogspot.com
Twitter:@Leo_FFerreyra