|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
结论:和PHP一样,ASP简单而易于维护,很适合小型网站应用,通过DCOM和MTS技术,ASP甚至还可以完成小规模的企业应用,但ASP的致命缺点就是不支持跨平台的系统,在大型项目开发和维护上非常困难。函数|函数1.Array()
FUNCTION:Returnsavariantcontaininganarray.
SYNTAX:Array(list)
ARGUMENTS:listisacomma-delimitedlistofvaluestoaddtothearray.
EXAMPLE:<%
DimmyArray()
Fori=1to7
RedimPreservemyArray(i)
myArray(i)=WeekdayName(i)
Next
%>
RESULT:CreatesanArraycontains7elements:
myArray("Sunday","Monday",......"Saturday")
-------------------------------------
2.CInt()
FUNCTION:ReturnsanexpressionthathasbeenconvertedtoanIntergetsubtype.
SYNTAX:CInt(expression)
ARGUMENTS:expressionisanyvalidexpression
EXAMPLE:<%
f="234"
response.writecINT(f)+2
%>
RESULT:236
Convertsstring"234"tomathematicvalue234.
Iffisempty(un-initializedvariable),cINT()returns0.
-------------------------------------
3.CreateObject()
FUNCTION:CreatesandreturnsareferencetoActiveXautomationobject.
SYNTAX:CreateObject(objName)
ARGUMENTS:objNameisanyvalidActiveXautomationobject.
EXAMPLE:<%
Setcon=Server.CreateObject("ADODB.Connection")
%>
RESULT:
-------------------------------------
4.CStr()
FUNCTION:ReturnsanexpressionthathasbeenconvertedtoavariantofsubtypeString.
SYNTAX:CStr(expression)
ARGUMENTS:expressionisanyvalidexpression
EXAMPLE:<%
s=3+2
response.write"Theresultis:"&cStr(s)
%>
RESULT:Convertsamathematicvalue5toastring"5".
-------------------------------------
5.Date()
FUNCTION:Returnsthecurrentsystemdate.
SYNTAX:Date()
ARGUMENTS:None.
EXAMPLE:<%=Date%>
RESULT:8/4/99
-------------------------------------
6.DateAdd()
FUNCTION:Returnsadatetowhichaspecifictimeintervalhasbeenadded.
SYNTAX:DateAdd(timeinterval,number,date)
ARGUMENTS:timeintervalisthetimeintervaltoadd;numberisamountoftimeintervalstoadd;anddate
isthestartingdate.
EXAMPLE:<%
currentDate=#8/4/99#
newDate=DateAdd("m",3,currentDate)
response.writenewDate
%>
<%
currentDate=#12:34:45PM#
newDate=DateAdd("h",3,currentDate)
response.writenewDate
%>
RESULT:11/4/99
3:34:45PM
"m"="month";
"d"="day";
IfcurrentDateisintimeformatthen,
"h"="hour";
"s"="second";
-------------------------------------
7.DateDiff()
FUNCTION:Returnsthenumberofintervalsbetweentwodates.
SYNTAX:DateDiff(timeinterval,date1,date2[,firstdayofweek[,firstweekofyear]])
ARGUMENTS:timeintervalisthetimeintervaltoadd;dateisavaliddateexpression;firstdayofweekand
firstweekofyearareoptionalvaluestospecifythefirstdayoftheweekandfirstweekofyear.
EXAMPLE:<%
fromDate=#8/4/99#
toDate=#1/1/2000#
response.write"Thereare"&_
DateDiff("d",fromDate,toDate)&_
"daystomilleniumfrom8/4/99."
%>
RESULT:Thereare150daystomilleniumfrom8/4/99.
-------------------------------------
8.Day()
FUNCTION:Returnsawholenumberrepresentingthedayofthemonth.
SYNTAX:Day(date)
ARGUMENTS:dateisanyvaliddateexpression.
EXAMPLE:<%=Day(#8/4/99#)%>
RESULT:4
-------------------------------------
9.FormatCurrency()
FUNCTION:Returnsanexpressionformattedasacurrencyvalue.
SYNTAX:FormatCurrency(Expression[,Digit[,LeadingDigit[,Paren[,GroupDigit]]]])
ARGUMENTS:Expressionisavalidnumericexpression;Digitisanoptionalnumericvalueusedtoindicate
numberofdigitstotherightofthedecimalpoint;LeadingDigitisanoptionaltristatevaluetodisplay
aleadingzero;Parenisanoptionaltristatevalueusedtodisplayparenthesesaroundnegativevalues;
andGroupDigitisanoptiontristatevalueusedtodisplayanumberasspecifiedinthegroupdelimiter
settingsoftheControlPanelsregionalsettings.
EXAMPLE:<%=FormatCurrency(34.3456)%>
RESULT:$34.35
-------------------------------------
10.FormatDateTime()
FUNCT</p>对于中小型web应用来说,php有很强的竞争力,linux+apache+mysql+php(lamp)的组合几乎可以胜任绝大多数网站的解决方案,对于大型应用来讲,对于系统架构要求更高,需要有成熟的框架支持,jsp的struts是个不错的框架,国内介绍它的资料也非常多,应用逐渐广泛起来。asp就不用说了, |
|