CÓMO INSERTAR UN RELOJ DIGITAL
Coloca un reloj digital en el que aparece la hora actual del ordenador.
Un truco fácil que le da un pequeño toque personal a la web que estamos creando. El código lo podemos insertar en cualquier parte de nuestra página web.
El efecto sería el siguiente:
|
|
CÓDIGO A COPIAR:
<form name="Tick">
<input type="text" size="11" name="Clock">
</form>
<script>
<!--
/*By George Chiang (WA's JavaScript tutorial)Credit must stay intact for use*/
function show(){
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="AM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
document.Tick.Clock.value=hours+":"+minutes+":"
+seconds+" "+dn
setTimeout("show()",1000)
}
show()
//-->
</script>
|
|
|
|
Una variante posible seria:
-reloj sin borde: simplemente cambiando esta línea <input type="text" size="11" name="Clock"> por esta otra <input type="text" size="11" name="Clock" style="border:none;" > el efecto sería el siguiente:
Reloj negro
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "5012-black.swf";obj.TimeZone = "GMT-0500";obj.width = 151;obj.height = 50;obj.wmode = "transparent";showClock(obj);</script>
_____________
RELOJ AZUL
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "5012-blue.swf";obj.TimeZone = "GMT-0500";obj.width = 151;obj.height = 50;obj.wmode = "transparent";showClock(obj);</script>
______________
RELOJ VERDE
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "5012-green.swf";obj.TimeZone = "GMT-0500";obj.width = 151;obj.height = 50;obj.wmode = "transparent";showClock(obj);</script>
RELOJ NARANJA
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "5012-orange.swf";obj.TimeZone = "GMT-0500";obj.width = 151;obj.height = 50;obj.wmode = "transparent";showClock(obj);</script>
______________________
RELOJ ESTILO MAPA AZUL
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "world001-blue.swf";obj.TimeZone = "GMT-0500";obj.width = 720;obj.height = 375;obj.wmode = "transparent";showClock(obj);</script>
___________________
RELOJ ESTILO MAPA VERDE
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "world001-green.swf";obj.TimeZone = "GMT-0500";obj.width = 720;obj.height = 375;obj.wmode = "transparent";showClock(obj);</script>
__________________
RELOJ ESTILO MAPA ROJO
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "world001-red.swf";obj.TimeZone = "GMT-0500";obj.width = 720;obj.height = 375;obj.wmode = "transparent";showClock(obj);</script>
______________
RELOJ ESTILO MAPA GRIS
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "world001-gray.swf";obj.TimeZone = "GMT-0500";obj.width = 720;obj.height = 375;obj.wmode = "transparent";showClock(obj);</script>
__________________
RELOJ REDONDO CAFE
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "0022-brown.swf";obj.TimeZone = "GMT-0500";obj.width = 135;obj.height = 135;obj.wmode = "transparent";showClock(obj);</script>
__________________