<script type="text/javascript"> var d=new Date() var weekday=new Array(7) weekday[0]="Sunday" weekday[1]="Monday" weekday[2]="Tuesday" weekday[3]="Wednesday" weekday[4]="Thursday" weekday[5]="Friday" weekday[6]="Saturday" document.write("Today it is " + weekday[d.getDay()
]) </script>
如果是指定日期的话,当天的月份,比如8月份的话,month的值应该是7,
如果是求当天的天数的话,getDate中的month是不减一的。