|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
asp对于服务器的要求较高,一般的服务器如果访问量一大就垮了,不得不重启。收罗|程序ThisisanASPpage,whichissupposedtobeopenedinanewbrowserwindow,itautomaticallyresizes
toaclientsresolution,displayingmonthviewwithapossibilitytopickadate,whichistheninserted
intoaopenerpagecontrol(likeinputtype"text"control),whosereferenceispassedasanargumentto
thisASPpage
code:
CantCopyandPastethis?
Clickhereforacopy-and-pastefriendlyversionofthiscode!
**************************************
Name:ASPDatePicker
Description:ThisisanASPpage,which
issupposedtobeopenedinanewbrowse
rwindow,itautomaticallyresizestoa
clientsresolution,displayingmonthvi
ewwithapossibilitytopickadate,wh
ichistheninsertedintoaopenerpage
control(likeinputtype"text"control)
,whosereferenceispassedasanargume
nttothisASPpage
By:VadimMaslov
Inputs:2possibleinputarguments:dat
etodisplaymonthfor(ifnone-today
smonthisautomaticdefault)+openerp
agecontrolname:calendar.asp?date=10/1
2/2000&ctl=calendar
Returns:None
Assumes:None
SideEffects:Codeprobablyneedstobe
adjustedifaserversRegionalsettings
arenotAmerican
Warranty:
codeprovidedbyPlanetSourceCode(tm)
(www.Planet-Source-Code.com)asis,wi
thoutwarrantiesastoperformance,fitn
ess,merchantability,andanyotherwarra
nty(whetherexpressedorimplied).
TermsofAgreement:
Byusingthissourcecode,youagreeto
thefollowingterms...
1)Youmayusethissourcecodeinper
sonalprojectsandmaycompileitintoa
n.exe/.dll/.ocxanddistributeitinbi
naryformatfreelyandwithnocharge.
2)YouMAYNOTredistributethissourc
ecode(forexampletoawebsite)witho
utwrittenpermissionfromtheoriginal
author.Failuretodosoisaviolationo
fcopyrightlaws.
3)Youmaylinktothiscodefromanot
herwebsite,provideditisnotwrapped
inaframe.
4)Theauthorofthiscodemayhavere
tainedcertainadditionalcopyrightrigh
ts.Ifso,thisisindicatedintheautho
rsdescription.
**************************************
<%@Language=VBScript%>
<%
OptionExplicit
ConstTOP_COORDINATE=30
DimcurDate
DimdaysCount
DimlastDay
DimfirstDay
Dimi
DimtopC
DimleftC
DimtempDate
DimcurMonth
DimcurYear
DimcalHTML
DimpDate
DimcurMonthText
DimrowCount
DimnextMonth
DimprevMonth
DimretControl
curDate=Request("date")
retControl=Request("ctl")
IfIsDate(curDate)ThenpDate=FormatDateTime(curDate,0)
IfcurDate=""Then
curDate=Now()
Else
IfIsDate(curDate)ThencurDate=Month(curDate)&"/"&Day(curDate)&"/"&Year
(curDate)
EndIf
IfIsDate(curDate)Then
curMonth=Month(curDate)
curMonthText=TextMonth(curMonth)&"-"&Year(curDate)
curYear=Year(curDate)
firstDay=curMonth&"/"&"01"&"/"&curYear
lastDay=DateAdd("d",-1,DateAdd("m",1,firstDay))
nextMonth=DateAdd("m",1,firstDay)
nextMonth=FormatDateTime(Month(nextMonth)&"/"&Day(curDate)&"/"&Year
(nextMonth),0)&_
"&ctl="&retControl
prevMonth=DateAdd("m",-1,firstDay)
prevMonth=FormatDateTime(Month(prevMonth)&"/"&Day(curDate)&"/"&Year
(prevMonth),0)&_
"&ctl="&retControl
daysCount=CInt(Day(lastDay))
Fori=1TodaysCount
tem</p>缺点:正版成本价格贵(盗版就不说了)、不够安全,大多数服务器用windows系统,没有linux安全 |
|