-
-4 21
记录进入页面的时间,效果如下:

<!--拷贝下面的代码到你的html文件的<body>和</body>之间-->
<script language="JavaScript">
<!--
now = new Date()
hour = now.getHours()
if (hour < 12) {
document.write("您是从: \"" + now.toLocaleString()+"\" 进入本页的!")
} else if (hour < 18){
document.write("您是从: \"" + now.toLocaleString()+"\" 进入本页的!")
} else if (hour >= 18) {
document.write("您是从: \"" + now.toLocaleString()+"\" 进入本页的!")
}
// -->
</script>
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

- 评论(0)
发表评论 TrackBack