<%
Response.Write " <select size=""1"" name=""datYear"">"
For i = 2005 To Year(Date)
Response.Write "<option value=""" & i & """"
If i = Year(Date) Then
Response.Write " selected"
End If
Response.Write ">" & i & "</option>"
Next
Response.Write " </select> - "
Response.Write " <select size=""1"" name=""datMonth"">"
For i = 1 To 12
Response.Write "<option value=""" & i & """"
If i = Month(Date) Then
Response.Write " selected"
End If
Response.Write ">" & i & "</option>"
Next
Response.Write " </select> - "
Response.Write " <select size=""1"" name=""datDay"">"
For i = 1 To 31
Response.Write "<option value=""" & i & """"
If i = Day(Date) Then
Response.Write " selected"
End If
Response.Write ">" & i & "</option>"
Next
Response.Write " </select> "
%>
这个虽然没有技术含量,但是在某些场合非常实用,这才是最关键的,生成最新日期与时间选择(年月日)下拉框
主要用于管理中心,用户选择出生日期等一类的需要日期的地方。