国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

ASP日期函數運用—生成簡單的日歷

2019-11-17 04:13:31
字體:
來源:轉載
供稿:網友

<%@LANGUAGE="VBSCR<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<style type="text/
CSS">
body{
font-size:12px;
}
table{
text-align:center;
}
#curr{
background-color:#CC99CC;
}
</style>
</head>

<body>
<%
dim lines,currY,currD,firDate,firWeek,maxDay,days
sub cal(dateStr)
if dateStr="" then
dateStr=date()
end if
currY=year(dateStr)
currM=month(dateStr)
currD=day(dateStr)
firDate=currY&"-"&currM&"-1"
firWeek=weekDay(firDate)
maxDay=day(dateSerial(y,m+1,0))
days=maxDay+firWeek-1
if days mod 7 = 0 then
lines=int(days/7)-1
else
lines=fix(days/7)
end if
end sub
'這樣就生成2008年8月的日歷
'ds="2008-8-8"
'call cal(ds)
call cal("")
%>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="25" height="25">日</td>
    <td width="25" height="25">一</td>
    <td width="25" height="25">二</td>
    <td width="25" height="25">三</td>
    <td width="25" height="25">四</td>
    <td width="25" height="25">五</td>
    <td width="25" height="25">六</td>
  </tr>
  <%for i=0 to lines%>
  <tr>
    <%
for j=1 to 7
square=7*i+j-firWeek+1
if square<1 or square>maxDay then
response.Write("<td width='25' height='25'> </td>")
elseif square=currD then
response.Write("<td width='25' height='25' id='curr'>"&square&"</td>")
else
response.Write("<td width='25' height='25'>"&square&"</td>")
end if
next
%>
  </tr>
  <%next%>
</table>
</body>
</html>


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 承德县| 巴中市| 高青县| 耿马| 古交市| 二连浩特市| 东明县| 柘城县| 昆山市| 曲阳县| 都安| 临潭县| 鹤岗市| 高尔夫| 含山县| 荔浦县| 任丘市| 正安县| 安龙县| 外汇| 常宁市| 鄯善县| 泸定县| 卓资县| 海门市| 沈阳市| 永清县| 梁平县| 图片| 贡觉县| 珲春市| 黑水县| 梁山县| 惠东县| 外汇| 丰都县| 赞皇县| 新津县| 皋兰县| 遂溪县| 阳高县|