LOGO OA教程 ERP教程 模切知识交流 PMS教程 CRM教程 开发文档 其他文档  
 
网站管理员

ASP简单日历程序

admin
2010年7月8日 13:50 本文热度 4815
[br]<% [br]y=request.querystring("y") [br]m=request.querystring("m") [br]d=request.querystring("d") [br][br]if y="" then [br] y=year(date) [br] m=month(date) [br] d=day(date) [br]end if [br][br]call blogdate(y,m,d) [br][br]'=====================以年月日为参数的显示============================================== [br]sub blogdate(y,m,d) ' [br]str1=" 当前的日期是"&y&"年"&m&"月"&d&"日 " '得到当前日期的年月日 [br]nowdate=y&"-"&m&"-"&d [br]lastdate=dateadd("m",-1,nowdate) [br]lasty=year(lastdate) [br]lastm=month(lastdate) [br]nextdate=dateadd("m",1,nowdate) [br]nexty=year(nextdate) [br]nextm=month(nextdate) [br]str1=str1&"上一月 " [br]str1=str1&"下一月 " [br]str1=str1&"返回今日" [br]response.write str1 [br]thismonth=y&"-"&m&"-1" '当前月的第一天 [br]nextmonth=dateadd("m",1,thismonth) '下个月的第一天 [br]num=datediff("d",thismonth,nextmonth) '当前月的天数 [br]firstday=weekday(thismonth)-1 '得到当前月第一天的星期 [br]'call displaydate(firstday,num) [br]response.write "" & vbcrlf [br]response.write "" & vbcrlf [br]response.write "" & vbcrlf [br]response.write "" & vbcrlf [br]response.write "" & vbcrlf [br]response.write "" & vbcrlf [br]response.write "" & vbcrlf [br]response.write "" & vbcrlf [br]response.write "" & vbcrlf [br]response.write "" & vbcrlf [br]'需要参数:当前月第一天的星期firstday,当前月的天数num [br]for n=1 to 6 [br]response.write "" [br] for i=1 to 7 [br] thisday=0 [br] if i>firstday then thisday=i-firstday [br] if n>1 then thisday=7*(n-1)+i-firstday [br] if thisday>num then thisday=0 [br] if thisday=0 then [br] display=" " [br] else [br] display=""&thisday&"" [br] end if [br] response.write "" [br] next [br] if n=5 and (thisday=num or thisday=0) then n=n+1 [br]response.write "" [br]next [br]response.write "
星期日星期一星期二星期三星期四星期五星期六
"&display&"
" & vbcrlf [br]end sub [br]'=================================================================== [br]%> [code] <% y=request.querystring("y") m=request.querystring("m") d=request.querystring("d") if y="" then y=year(date) m=month(date) d=day(date) end if call blogdate(y,m,d) '=====================以年月日为参数的显示============================================== sub blogdate(y,m,d) ' str1=" 当前的日期是"&y&"年"&m&"月"&d&"日 " '得到当前日期的年月日 nowdate=y&"-"&m&"-"&d lastdate=dateadd("m",-1,nowdate) lasty=year(lastdate) lastm=month(lastdate) nextdate=dateadd("m",1,nowdate) nexty=year(nextdate) nextm=month(nextdate) str1=str1&"上一月 " str1=str1&"下一月 " str1=str1&"返回今日" response.write str1 thismonth=y&"-"&m&"-1" '当前月的第一天 nextmonth=dateadd("m",1,thismonth) '下个月的第一天 num=datediff("d",thismonth,nextmonth) '当前月的天数 firstday=weekday(thismonth)-1 '得到当前月第一天的星期 'call displaydate(firstday,num) response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf '需要参数:当前月第一天的星期firstday,当前月的天数num for n=1 to 6 response.write "" for i=1 to 7 thisday=0 if i>firstday then thisday=i-firstday if n>1 then thisday=7*(n-1)+i-firstday if thisday>num then thisday=0 if thisday=0 then display=" " else display=""&thisday&"" end if response.write "" next if n=5 and (thisday=num or thisday=0) then n=n+1 response.write "" next response.write "
星期日星期一星期二星期三星期四星期五星期六
"&display&"
" & vbcrlf end sub '=================================================================== %> [/code]

该文章在 2010/7/22 10:55:31 编辑过
关键字查询
相关文章
正在查询...
点晴ERP是一款针对中小制造业的专业生产管理软件系统,系统成熟度和易用性得到了国内大量中小企业的青睐。
点晴PMS码头管理系统主要针对港口码头集装箱与散货日常运作、调度、堆场、车队、财务费用、相关报表等业务管理,结合码头的业务特点,围绕调度、堆场作业而开发的。集技术的先进性、管理的有效性于一体,是物流码头及其他港口类企业的高效ERP管理信息系统。
点晴WMS仓储管理系统提供了货物产品管理,销售管理,采购管理,仓储管理,仓库管理,保质期管理,货位管理,库位管理,生产管理,WMS管理系统,标签打印,条形码,二维码管理,批号管理软件。
点晴免费OA是一款软件和通用服务都免费,不限功能、不限时间、不限用户的免费OA协同办公管理系统。
Copyright 2010-2024 ClickSun All Rights Reserved