文件名称:JavaScript 数字时钟代码
文件大小:4KB
文件格式:RAR
更新时间:2012-06-07 10:26:19
闹钟
JavaScript 数字时钟代码 function Time(){ if (!document.layers&&!document.all) return var Timer=new Date() var hours=Timer.getHours() var minutes=Timer.getMinutes() var seconds=Timer.getSeconds() var noon="AM" if (hours>12){ noon="PM" hours=hours-12 } if (hours==0) hours=12 if (minutes<=9) minutes="0"+minutes if (seconds<=9) seconds="0"+seconds //change font size here to your desire myclock=""+hours+":"+minutes+":" +seconds+" "+noon+"" if (document.layers){ document.layers.position.document.write(myclock) document.layers.position.document.close() } else if (document.all) position.innerHTML=myclock setTimeout("Time()",1000) } //-->
【文件预览】:
JavaScript
----exemple()
--------显示时间.txt(999B)
--------数字时钟2.txt(2KB)
--------数字时钟1.txt(871B)
----语法.txt(3KB)
----数据类型.txt(2KB)