方法一:
dim intMaxDay,theDay theDay=date() intMaxDay=DateDiff("d",theDay,DateAdd("m",1,theDay))
方法二:
dim dayNum,theYear,theMonth theYear=2005 theMonth=9 '根据前面年、和月来计算该月有几天 dayNum=Day(DateAdd("d",-1,DateAdd("m",1,Cdate(theYear & "-" & theMonth & "-1")))) response.write dayNum