功能非常全面的日期处理函数

2018-09-06 11:09

阅读:409

  
function fnSubmit(strPage)
{
document.forms[0].action= strPage
document.forms[0].submit()
}


<%

call writedropdowns

Sub writeDropDowns()
Dim strSelfLink
strSelfLink = request.servervariables(SCRIPT_NAME)
vbcrlf
response.Write MonthDropDown(month1,False,request(month1),strSelfLink) DayDropDown(day1, ,getDaysInMonth(request(month1),request(year1)),request(day1)) YearDropDown(year1,,, request(year1),strSelfLink) vbcrlf
vbcrlf
End Sub


Function MonthDropDown(strName, blnNum, strSelected, strSelfLink)
Dim strTemp, i, strSelectedString
vbcrlf
vbcrlf
For i = 1 To 12
If strSelected = CStr(i) Then
strSelectedString = Selected
Else
strSelectedString =
End If

If blnNum Then
vbcrlf
Else
vbcrlf
End If
Next
vbcrlf
MonthDropDown = strTemp
End Function


Function YearDropDown(strName, intStartYear, intEndYear, strSelected, strSelfLink)

Dim strTemp, i, strSelectedString

If intStartYear = Then
intStartYear = Year(now())
End If

If intEndYear = Then
intEndYear = Year(now()) + 9
End If


评论


亲,登录后才可以留言!