javascript date部分
<html> <body> <script type="text/javascript"> var d=new Date() var weekday=new Array(7) weekday[0]="星期日" weekday[1]="星期一" weekday[2]="星期二" weekday[3]="星期三" weekday[4]="星期四" weekday[5]="星期五" weekday[6]="星期六" document.write("今天是" + d.toString()+"</br>") document.write("今天是" + d.getDay())//得到今天星期几 document.write("今天是" + d.getDate())//得到今天几号 document.write("今天是" + weekday[d.getDay()]) document.write("今天是" + d.getFullYear())//得到今天的年份 </script> </body> </html>