下面asp代码年下拉框中。年份显示1975年到2025年,(startyear=currentyear-50 改-60可显示1965年到2025年)改-70就出错了。请教老师改年份显示1950年到2025年.谢谢!
<%
Response.write "<tr Class=LightTableBody>"&_
"<td>您的生日<BR>以公历为准</td>"&_
"<td nowrap><Select name=year size=1>"
currentyear=cint(year(date()))
startyear=currentyear-50
for i=startyear to currentyear
Response.write "<option value="&i
if i=currentyear-22 Then Response.write " selected"
Response.write ">"&i&"</option>"
next
Response.write "</Select> 年 <Select name=month size=1>"
for i=1 to 12
Response.write "<option value="&i
if i=6 Then Response.write " selected"
Response.write ">"&i&"</option>"
next
Response.write "</Select> 月 <Select name=day size=1>"
for i=1 to 31
Response.write "<option value="&i
if i=15 Then Response.write " selected"
Response.write ">"&i&"</option>"
next
Response.write "</Select> 日 **</td></tr>"
%>