28,406
社区成员
发帖
与我相关
我的任务
分享
<%
n = Trim(Request("n"))
If n = "" Then
n = 0
End If
n = CInt(n)
cd = DateAdd("ww",n , Date())
w = Weekday(cd, 2)
fd = DateAdd("d", 1-w, cd)
For i = 0 To 6
dt = DateAdd("d", i , fd)
response.Write fmtDate(dt) & "<br>"
Next
Function fmtDate(dt)
Dim y, m, d
y = Year(dt)
m = "0" & Month(dt)
d = "0" & Day(dt)
m = Right(m, 2)
d = Right(d, 2)
fmtDate = y & "-" & m & "-" & d
End Function
%>
<input type="button" value="上一周" onclick="location.href='?n=<%=n-1%>'"> <input type="button" value="下一周" onclick="location.href='?n=<%=n+1%>'">