您的位置:首页精文荟萃软件资讯 → 一个提供用户输入时期的绝好程序之二

一个提供用户输入时期的绝好程序之二

时间:2004/10/7 19:18:00来源:本站整理作者:蓝点我要评论(0)

DateSelect.asp 创立一个日历格式的。。。



<%@ LANGUAGE="VBSCRIPT" %>

<%

'Code Written by D. Scott Hand

'If any errors are found, please

'e-mail scott_hand@pobox.com with

'the error and the way the error

'was caused

'***Purpose:************

'* This is a page built to show calendar functionality.

'* Description:

'* This is the instantiated file toto

'* allow the user to select a date.

'***********************

If Request.Querystring("Page") <> "" Then

   PageName = Request.Querystring("Page")

   Session("PageName") = PageName

Else

   PageName = Session("PageName")

End If

If Request.Querystring("Form") <> "" Then

   FormName = Request.Querystring("Form")

   Session("FormName") = FormName

Else

   FormName = Session("FormName")

End If

If Request.Querystring("Element") <> "" Then

   ElementName = Request.Querystring("Element")

   Session("ElementName") = ElementName

Else

   ElementName = Session("ElementName")

End If

%>









Select Date







<%

If IsDate(Request.QueryString("Date")) Then

BuildDate=Request.QueryString("Date")

Else



If Request.Querystring("BMonth") = "" Then

BMonth = Month(Now)

Else

BMonth = Request.Querystring("BMonth")

End If



If Request.QueryString("BYear") <> "" Then

BuildDate = BMonth & "/" & "1" & "/" & _

       Request.QueryString("BYear")

Else

BuildDate = BMonth & "/" & "1" & "/" & Right(Year(Now), 2)

End If



End If

Session("CurrentDate")=BuildDate



'This gives the position of weekday for that date

BuildDayValue = Weekday(BuildDate)





CurrentMonth = Month(BuildDate)

%>























<%

DayPosition=1

'Now loop through table build with blanks until first day of month

'is in position

For I = 1 to BuildDayValue-1



%>



<%

DayPosition=DayPosition+1

Next



Do Until CurrentMonth <> Month(BuildDate)

%>



<%

While DayPosition<>8

%>



<%

DayPosition=DayPosition+1

BuildDate=DateAdd("d", 1, BuildDate)

If CurrentMonth <> Month(BuildDate) then

DayPosition=8

End If

Wend

DayPosition=1

%>





<%

Loop

%>








<%=MonthName(CurrentMonth)%>&nbsp;<%=Year(BuildDate)%>






<%

'BuildDate=DateAdd("d", -1, BuildDate)

If CurrentMonth < 12 then

NextMonth=CurrentMonth+1 & "&BYear=" & Year(BuildDate)

Else

NextMonth="1&BYear=" & Year(DateAdd ("yyyy", 1, BuildDate))

End if



If CurrentMonth > 1 then

PreviousMonth=CurrentMonth-1 & "&BYear=" & Year(BuildDate)

Else

PreviousMonth= "12&BYear=" & Year(DateAdd ("yyyy", -1, BuildDate))

End If

%>


size=-2><--Previous


&nbsp;&nbsp;&nbsp;

Next-->






SuMo
size="-3">Tu
We
size="-3">Th
FrSa
&nbsp;

onClick="<%Response.Write "calpopulate('" & Month(BuildDate) & "/" & Day(BuildDate) & "/" & Right(Year

(BuildDate),2)%>')">



<%=Day(BuildDate)%>














相关阅读 Windows错误代码大全 Windows错误代码查询激活windows有什么用Mac QQ和Windows QQ聊天记录怎么合并 Mac QQ和Windows QQ聊天记录Windows 10自动更新怎么关闭 如何关闭Windows 10自动更新windows 10 rs4快速预览版17017下载错误问题Win10秋季创意者更新16291更新了什么 win10 16291更新内容windows10秋季创意者更新时间 windows10秋季创意者更新内容kb3150513补丁更新了什么 Windows 10补丁kb3150513是什么

文章评论
发表评论

热门文章 360快剪辑怎么使用 36金山词霸如何屏幕取词百度收购PPS已敲定!3

最新文章 微信3.6.0测试版更新了微信支付漏洞会造成哪 360快剪辑怎么使用 360快剪辑软件使用方法介酷骑单车是什么 酷骑单车有什么用Apple pay与支付宝有什么区别 Apple pay与贝贝特卖是正品吗 贝贝特卖网可靠吗

人气排行 xp系统停止服务怎么办?xp系统升级win7系统方电脑闹钟怎么设置 win7电脑闹钟怎么设置office2013安装教程图解:手把手教你安装与qq影音闪退怎么办 QQ影音闪退解决方法VeryCD镜像网站逐个数,电驴资料库全集同步推是什么?同步推使用方法介绍QQ2012什么时候出 最新版下载EDiary——一款好用的电子日记本