Fijate,pude lograr que no marque las 26,27y demàs pero no puedo hacer que aparezca el mensaje...
Èste es el còdigo:
Código:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function Reloj()
{
horario = new Date()
hora_espana = horario.getUTCHours()
hora_ny = horario.getUTCHours()
hora_tk = horario.getUTCHours()
hora_sd = horario.getUTCHours()
hora_lnd = horario.getUTCHours()
minuto = horario.getMinutes()
segundo = horario.getSeconds()
cero=0
uno=1
dos=2
tres=3
cuatro=4
cinco=5
seis=6
siete=7
ocho=8
nueve=9
diez=10
once=11
doce=12
if (minuto<10)
minuto="0"+minuto;
if (segundo<10)
segundo="0"+segundo;
hora_espana=hora_espana+2;
mostrarhora=hora_espana+":"+minuto+":"+segundo
document.reloj.reloj_espana.value=mostrarhora
document.reloj.reloj_espana.style.color=(hora_espana>=8&&hora_espana<16)?'green':'red'
hora_ny=hora_ny-4;
mostrarhora2=hora_ny+":"+minuto+":"+segundo
document.reloj.reloj_ny.value=mostrarhora2
document.reloj.reloj_ny.style.color=(hora_ny>=8&&hora_ny<16)?'green':'red'
if (hora_ny>=1 && hora_ny<=7) document.reloj.estado_ny.value="Apertura 8:00 A.M"
if (hora_ny>=8 && hora_ny<=15) document.reloj.estado_ny.value="Cierre 16:00 P.M"
if (hora_ny>=16 && hora_ny<=23) document.reloj.estado_ny.value="Apertura 8:00 A.M"
if (hora_ny==00) document.reloj.estado_ny.value="Apertura 8:00 A.M"
if (hora_espana>=1 && hora_espana<7) document.reloj.estado_espana.value="Apertura 8:00
A.M"
if (hora_espana>=8 && hora_espana<=15) document.reloj.estado_espana.value="Cierre 16:00
P.M"
if (hora_espana>=16 && hora_espana<=23) document.reloj.estado_espana.value="Apertura 8:00
PM"
if (hora_espana=00) document.reloj.estado_espana.value="Apertura 8:00 A.M"
hora_tk=hora_tk+9;
mostrarhora3=hora_tk+":"+minuto+":"+segundo
document.reloj.reloj_tk.value=mostrarhora3
document.reloj.reloj_tk.style.color=(hora_tk>=8&&hora_tk<16)?'green':'red'
if(hora_tk==24) document.reloj.reloj_tk.value=cero+":"+minuto+":"+segundo
if(hora_tk==25) document.reloj.reloj_tk.value=uno+":"+minuto+":"+segundo
if(hora_tk==26) document.reloj.reloj_tk.value=dos+":"+minuto+":"+segundo
if(hora_tk==27) document.reloj.reloj_tk.value=tres+":"+minuto+":"+segundo
if(hora_tk==28) document.reloj.reloj_tk.value=cuatro+":"+minuto+":"+segundo
if(hora_tk==29) document.reloj.reloj_tk.value=cinco+":"+minuto+":"+segundo
if(hora_tk==30) document.reloj.reloj_tk.value=seis+":"+minuto+":"+segundo
if(hora_tk==31) document.reloj.reloj_tk.value=siete+":"+minuto+":"+segundo
if(hora_tk==32) document.reloj.reloj_tk.value=ocho+":"+minuto+":"+segundo
if(hora_tk==33) document.reloj.reloj_tk.value=nueve+":"+minuto+":"+segundo
if(hora_tk==34) document.reloj.reloj_tk.value=diez+":"+minuto+":"+segundo
if(hora_tk==35) document.reloj.reloj_tk.value=once+":"+minuto+":"+segundo
if(hora_tk==36) document.reloj.reloj_tk.value=doce+":"+minuto+":"+segundo
if (hora_tk>=1 && hora_tk<=7) document.reloj.estado_tk.value="Apertura 8:00 A.M"
if (hora_tk>=8 && hora_tk<=15) document.reloj.estado_tk.value="Cierre 16:00 P.M"
if (hora_tk>=16 && hora_tk<=23) document.reloj.estado_tk.value="Apertura 8:00 A.M"
if (hora_tk==00) document.reloj.estado_tk.value="Apertura 8:00 A.M"
setTimeout("Reloj()",1000)
}
//-->
</SCRIPT>
<BODY onLoad="Reloj()">
<table>
<tr>
<td width="193" height="88" class="menu3"><form name="reloj">
<B>España</B><BR>
<input type="text" name="reloj_espana" size="8"
Style="border:none;font-weight:bolder;font-family:verdana;"><BR>
<input type="text" name="estado_espana" size="17"
Style="border:none;font-weight:bolder;font-family:verdana;"><BR><BR>
<B>Nueva York</B><BR>
<input type="text" name="reloj_ny" size="8"
Style="border:none;font-weight:bolder;font-family:verdana;"><BR>
<input type="text" name="estado_ny" size="17"
Style="border:none;font-weight:bolder;font-family:verdana;"><BR><BR>
<B>Tokio</B><BR>
<input type="text" name="reloj_tk" size="8"
Style="border:none;font-weight:bolder;font-family:verdana;"><BR>
<input type="text" name="estado_tk" size="17"
Style="border:none;font-weight:bolder;font-family:verdana;"><BR><BR>
</form></td>
</tr>
</table>
</BODY>
</HTML>