国产探花免费观看_亚洲丰满少妇自慰呻吟_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>


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 汉源县| 襄城县| 靖安县| 时尚| 界首市| 淮安市| 锦州市| 阳春市| 永安市| 铜梁县| 和顺县| 宝应县| 阿鲁科尔沁旗| 和平县| 松阳县| 开江县| 崇信县| 肇庆市| 海南省| 荣成市| 抚州市| 辉南县| 措勤县| 京山县| 通许县| 布尔津县| 海丰县| 盈江县| 密山市| 都江堰市| 南皮县| 灯塔市| 汽车| 巴楚县| 五指山市| 德清县| 青铜峡市| 湖南省| 木里| 石首市| 霍城县|