Yo he usado este código javascript para hacer este reloj. Espero que te sirva
< script language="JavaScript" type="text/javascript"> < !-- var fecha = new Date(); var dia = fecha.getDay (); var dias = new Array ("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"); var mes = fecha.getMonth (); var meses = new Array ("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"); document.write (dias [dia] + ", " + fecha.getDate() + " de " + meses [mes] + " de " + fecha.getFullYear()); // -->
< /script>
< script type="text/javascript"> function hora(){ var fecha = new Date() var hora = fecha.getHours() var minuto = fecha.getMinutes() var segundo = fecha.getSeconds() if (hora < 10) {hora = "0" + hora} if (minuto < 10) {minuto = "0" + minuto} if (segundo < 10) {segundo = "0" + segundo} var horita = hora + ":" + minuto + ":" + segundo document.getElementById('hora').firstChild.nodeValue = horita tiempo = setTimeout('hora()',1000) } function inicio(){ document.write('') document.write ('000000') hora() }
Comentarios
Yo he usado este código
Yo he usado este código javascript para hacer este reloj. Espero que te sirva
< script language="JavaScript" type="text/javascript">< !--var fecha = new Date();var dia = fecha.getDay ();var dias = new Array ("Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"); var mes = fecha.getMonth ();var meses = new Array ("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");document.write (dias [dia] + ", " + fecha.getDate() + " de " + meses [mes] + " de " + fecha.getFullYear());// -->< /script>
--
saludos
cyfuss
y la hora:
y la hora:
< script type="text/javascript">function hora(){var fecha = new Date()var hora = fecha.getHours()var minuto = fecha.getMinutes()var segundo = fecha.getSeconds()if (hora < 10) {hora = "0" + hora}if (minuto < 10) {minuto = "0" + minuto}if (segundo < 10) {segundo = "0" + segundo}var horita = hora + ":" + minuto + ":" + segundodocument.getElementById('hora').firstChild.nodeValue = horitatiempo = setTimeout('hora()',1000)}function inicio(){document.write('')document.write ('000000')hora()}inicio()< /script>--
saludos
cyfuss
Enviar un comentario nuevo