免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
非常實用asp日歷代碼

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>日歷</title ></head>
<body bgcolor="#FFFFFF">
<style>
td{font-size:9pt;}
</style>
<%
' 要調用的函數聲明
'根據年份及月份得到每月的總天數
Function GetDaysInMonth(iMonth, iYear)
Select Case iMonth
Case 1, 3, 5, 7, 8, 10, 12
GetDaysInMonth = 31
Case 4, 6, 9, 11
GetDaysInMonth = 30
Case 2
If IsDate("February 29, " & iYear) Then
GetDaysInMonth = 29
Else
GetDaysInMonth = 28
End If
End Select
End Function
'得到一個月開始的日期.
Function GetWeekdayMonthStartsOn(dAnyDayInTheMonth)
Dim dTemp
dTemp = DateAdd("d", -(Day(dAnyDayInTheMonth) - 1), dAnyDayInTheMonth)
GetWeekdayMonthStartsOn = WeekDay(dTemp)
End Function
'得到當前一個月的上一個月.
Function SubtractOneMonth(dDate)
SubtractOneMonth = DateAdd("m", -1, dDate)
End Function
'得到當前一個月的下一個月.
Function AddOneMonth(dDate)
AddOneMonth = DateAdd("m", 1, dDate)
End Function
' 函數聲明結束

Dim dDate ' 日歷顯示的日期
Dim iDOW ' 每一月開始的日期
Dim iCurrent ' 當前日期
Dim iPosition ' 表格中的當前位置


' 得到選擇的日期并檢查日期的合法性
If IsDate(Request.QueryString("date")) Then
dDate = CDate(Request.QueryString("date"))
Else
If IsDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year")) Then
dDate = CDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year"))
Else
dDate = Date()

If Len(Request.QueryString("month")) <> 0 Or Len(Request.QueryString("day")) <> 0 Or Len(Request.QueryString("year")) <> 0 Or Len(Request.QueryString("date")) <> 0 Then
Response.Write "您所選擇的日期格式不正確,系統(tǒng)會使用當前日期.<BR><BR>"
End If

End If
End If

'得到日期后我們先得到這個月的天數及這個月的起始日期.
iDIM = GetDaysInMonth(Month(dDate), Year(dDate))
iDOW = GetWeekdayMonthStartsOn(dDate)

%>
<table width="180" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#F3F3F3">
<tr>
<td align="center" colspan="7"><table border="0" cellpadding="0" cellspacing="0"width="100%">
<tr>
<td height="22" align="right"><a href="?date=<%= SubtractOneMonth(dDate) %>"><<</a></td>
<td align="center"><font color="999999"><b><%= MonthName(Month(dDate)) & " " & Year(dDate) %></b></font></td>
<td><a href="?date=<%= AddOneMonth(dDate) %>">>></a></td>
</tr>
</table></td>
</tr>
<tr>
<td width="25" height="22" align="center"><font color="d08c00"><b>日</b></font> </td>
<td width="25" align="center"><b><font color="999999">一</font></b> </td>
<td width="25" align="center"><b><font color="999999">二</font></b> </td>
<td width="25" align="center"><b><font color="999999">三</font></b> </td>
<td width="25" align="center"><b><font color="999999">四</font></b> </td>
<td width="25" align="center"><b><font color="999999">五</font></b> </td>
<td width="25" align="center"><b><font color="d08c00">六</font></b> </td>
</tr>
<%
' 如果這個月的起始日期不是周日的話就加空的單元.
If iDOW <> 1 Then
Response.Write vbTab & "<TR>" & vbCrLf
iPosition = 1
Do While iPosition < iDOW
Response.Write vbTab & vbTab & "<TD> </TD>" & vbCrLf
iPosition = iPosition + 1
Loop
End If

' 繪制這個月的日歷
iCurrent = 1
iPosition = iDOW
Do While iCurrent <= iDIM
' 如果是一行的開頭就使用 TR 標記
If iPosition = 1 Then
Response.Write vbTab & "<TR>" & vbCrLf
End If

' 如果這一天是我們選擇的日期就高亮度顯示該日期.
If iCurrent = Day(dDate) Then
Response.Write vbTab & vbTab & "<TD BGCOLOR=#eeeeee height=18 align=center><B>" & iCurrent & "</B></TD>" & vbCrLf
Else
Response.Write vbTab & vbTab & "<TD height=18 align=center><A HREF=""?date=" & Month(dDate) & "-" & iCurrent & "-" & Year(dDate) & """>" & iCurrent & "</A></TD>" & vbCrLf
End If

' 如果滿一周的話表格就另起一行
If iPosition = 7 Then
Response.Write vbTab & "</TR>" & vbCrLf
iPosition = 0
End If

iCurrent = iCurrent + 1
iPosition = iPosition + 1
Loop

' 如果一個月不是以周六結束則加上相應的空單元.
If iPosition <> 1 Then
Do While iPosition <= 7
Response.Write vbTab & vbTab & "<TD> </TD>" & vbCrLf
iPosition = iPosition + 1
Loop
Response.Write vbTab & "</TR>" & vbCrLf
End If
%>
</table>

本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現有害或侵權內容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
精美播放器1款 - 邊緣的日志 - 網易博客
VB MsgBox 函數使用
flash中秋:一看就會的制作方法
excel中如何利用VBA批量生成XML文件
Word 使用宏根據文件名實現文件版本號自動更新
Excel 如何用代碼獲得計算機的主機編號!
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯系客服!

聯系客服