asp 簡單萬年曆顯示

2021-04-16 22:50:43 字數 1493 閱讀 3108

<%'宣告,程式規啊堅所有@

function wr(str)

response.write(str)

end function

thedate=date()

function ljj_days()'本月的天數

ljj_days=datediff("d",year(thedate)&"-"&month(thedate)&"-1",dateadd("m",1,cdate(year(thedate)&"-"&month(thedate)&"-1")))

end function

function firstweek(y,m)'一日的周次

firstweek=weekday(dateserial(y,m, 1))

end function

%>

<%'初始化陣列

dim arrays(7,7)

dim tem

tem=1

ds=date()

fir=firstweek(year(ds),month(ds))

for i=0 to 4

if i=0 then

for j=fir-1 to 6

arrays(i,j)=tem

tem=tem+1

next

else

for j=0 to 6

arrays(i,j)=tem

tem=tem+1

if tem=31 then

exit for

end if

next

end if

if tem=31 then

exit for

end if

next

%>

<%

dim ljj_date

ljj_date=date()

dim i

wr(""&year(ljj_date)&"年"&month(ljj_date)&"月

")wr("")'這裡是一條橫線

for i=1 to 7

wr("")

wr("")

if i=1 then '這裡先輸出星期,表頭,啊堅工作室

wr("星期日")

wr("星期一")

wr("星期二")

wr("星期三")

wr("星期四")

wr("星期五")

wr("星期六")

else

for j=1 to 7

if day(ljj_date)=arrays(i-2,j-1) then

wr("")

wr(arrays(i-2,j-1))

wr("")

else

wr("")

wr(arrays(i-2,j-1))

wr("")

end if

next

end if

wr("")

next

%>

簡易萬年曆

div設定 li body calendar calendar ul calendar li calendar li h2 calendar li p calendar active calendar active p calendar text calendar text h2 calendar ...

PHP實現簡單萬年曆

header content type text html charset utf 8 例項 萬年曆案例 需求 1 幾年 幾月 幾日 2 週日 週六 3 一號是星期幾 4 這個月有多少天 echo 獲取當前年 year get y get y date y 獲取當前月 month get m get...

迷你萬年曆for PocketPC

1.軟體配置 軟體名稱 迷你萬年曆 軟體id ewc sys 開發平台 net compact framework 1.0 執行平台 pocketpc 2003 開發語言 vb.net 多國語言簡中 簡繁結構體系 單機版開發日期 2006 02 2006 03 最高版本 2.5註冊方法 使用者名稱 ...