web、JS技术学习 https://www.itkc8.com
|
- <script language="javaScript"><!--
- now = new Date(),hour = now.getHours()
- if(hour < 6){document.write("凌晨好!")}
- else if (hour < 9){document.write("早上好!")}
- else if (hour < 12){document.write("上午好!")}
- else if (hour < 14){document.write("中午好!")}
- else if (hour < 17){document.write("下午好!")}
- else if (hour < 19){document.write("傍晚好!")}
- else if (hour < 22){document.write("晚上好!")}
- else {document.write("夜里好!")}
- // --></script>
- 今天是 <font color="#5c5c5c">
- <script language="JavaScript"><!--
- var dayNames = new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
- Stamp = new Date();
- document.write("" + Stamp.getYear() + "年"+(Stamp.getMonth() + 1) +"月"+Stamp.getDate()+ "日"+ " " + dayNames[Stamp.getDay()] +"");
- // -->
- </script>
web、JS技术学习 https://www.itkc8.com