按时间段显示问候语

发布时间:2011年1月10日 作者:未知 查看次数:2244

按时间段显示问候语


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb_2312-80">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>sieye *山西.襄垣</title>
</head>
<body>

<br><br><!--下面为演示代码-->


<p align="center"><font color="#0080FF" size="5">按时间段显示问候语</font></p>
<script language="LiveScript">
wenzi10_n=new Date(),wenzi10_h=wenzi10_n.getHours()
if(wenzi10_h<6){document.write("该休息了,这么早就起床吗?")}
else if(wenzi10_h<8){document.write("早上好!")}
else if(wenzi10_h<12){document.write("上午好!")}
else if(wenzi10_h<14){document.write("中午好!")}
else if(wenzi10_h<18){document.write("下午好!")}
else if(wenzi10_h<22){document.write("晚上好!")}
else if(wenzi10_h<24){document.write("夜深了!该休息了,要注意身体!")}
</script>


<br><br><!--以上为演示代码-->

<p align="right"><a href="http://www.sieye.cn">人之初 电脑爱号家园</a><br>山西.襄垣 </p><br><br><br><br>

</body>
</html>



版权所有!www.sieye.cn
E.Mail:sieye@sohu.com QQ:66697110