Ejemplos en Javascript

Reloj

<HTML>
<HEAD>

<TITLE>Ejemplos Javascript: ejemplo pr???¡ctico </TITLE>


</HEAD>

<BODY bgcolor="white" onLoad="show2()">

<span id=tick2>
</span>

<script>
<!--
/*By George Chiang (WA's JavaScript tutorial) http://www.geocities.com/SiliconValley/Vista/9892
Credit MUST stay intact for use*/
function show2(){
if (!document.all)
return
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
var ctime=hours+":"+minutes+":"+seconds+" "+dn
tick2.innerHTML="<b style='font-size:22;color:blue;'>"+ctime+"</b>"
setTimeout("show2()",1000)
}
//-->
</script>



</body>
</html>

S?lo para MsIE4