当前位置: 首页 > 图文教程 > 网络编程 > ASP > ASP中的函数应用方法及应用举例(二)

ASP
用ASP编写网络传呼机
用ASP+CSS实现随机背景
ASP下载系统防盗链方法
用ASP编写下载网页中所有资源的程序
Request.ServerVariables应用
解决Asp程序的Server.CreateObject错误
ASP实现TCP端口扫描的方法
源码实例:ASP实现远程保存图片
用ASP+DLL实现WEB方式修改服务器时间
ASP使用MySQL数据库全攻略
ASP+SQL Server构建网页防火墙
教程/ASP 十天学会ASP之第二天
教程/ASP 十天学会ASP之第四天
教程/ASP 十天学会ASP之第五天
教程/ASP 十天学会ASP之第六天
教程/ASP 十天学会ASP之第七天
教程/ASP 十天学会ASP之第八天
教程/ASP 十天学会ASP之第九天
教程/ASP 十天学会ASP之第十天
关于学习ASP和编程的28个观点

ASP中的函数应用方法及应用举例(二)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 23 ::
收藏到网摘: n/a

  21. IsObject()
  FUNCTION: Returns a boolean value indicating whether an expression refers to an automation object.
  SYNTAX: IsObject(expression)
  ARGUMENTS: expression is any valid expression.
  EXAMPLE: <%
Set con = Server.CreateObject("ADODB.Connection")
response.write IsObject(con)
%>
  RESULT: True
-------------------------------------
  
22. LBound()
  FUNCTION: Returns the base index value for a dimension of any array.
  SYNTAX: Lbound(arrayname [, dimension])
  ARGUMENTS: arrayname is the name of any array; dimension is an optional number indicating the dimension
to find the lower bound.
  EXAMPLE: <%
i = Array("Monday","Tuesday","Wednesday")
response.write LBound(i)
%>
  RESULT: 0
-------------------------------------
  
23. LCase()
  FUNCTION: Returns a string that has been converted into lowercase characters.
  SYNTAX: Lcase(string)
  ARGUMENTS: string is any valid string expression.
  EXAMPLE: <%
strTest = "This is a test!"
response.write LCase(strTest)
%>
  RESULT: this is a test!
-------------------------------------
  
24. Left()
  FUNCTION: Returns the number of characters from the left side of a string.
  SYNTAX: Left(string, length)
  ARGUMENTS: string is any valid string expression; length is the length of characters to return.
  EXAMPLE: <%
strTest = "This is a test!"
response.write Left(strTest, 3)
%>
  RESULT: Thi
-------------------------------------
  
25. Len()
  FUNCTION: Returns the number of characters in a string or the number of bytes required to store a
variable.
  SYNTAX: Len(string | varName)
  ARGUMENTS: string is any valid string expression; varName is any valid variable name.
  EXAMPLE: <%
strTest = "This is a test!"
response.write Len(strTest)
%>
  RESULT: 15
(The total length of strTest is 15 characters)
26.  
LTrim()
  FUNCTION: Returns a string without leading spaces.
  SYNTAX: LTrim(string)
  ARGUMENTS: string is any valid string expression.
  EXAMPLE: <%
strTest = " This is a test!"
response.write LTrim(strTest)
%>
  RESULT: This is a test!
-------------------------------------
  
27. Mid()
  FUNCTION: Returns a specified number of characters from a string.
  SYNTAX: Mid(string, start [, length])
  ARGUMENTS: string is any valid string expression; start is a numeric character position to begin
extraction from; length (optional) is the number of characters to return.
  EXAMPLE: <%
strTest = "This is a test! Today is Monday."
response.write Mid(strTest, 17, 5)
%>
  RESULT: Today
-------------------------------------
  
28. Minute()
  FUNCTION: Returns the number of the minutes in current system time.
  SYNTAX: Minute(time)
  ARGUMENTS: time is any valid time expression.
  EXAMPLE: <%=Minute(#12:45:32 PM#)%>
  RESULT: 45
-------------------------------------
  
29. Month()
  FUNCTION: Returns the number of the month of the year.
  SYNTAX: Month(date)
  ARGUMENTS: date is any valid date expression.
  EXAMPLE: <%=Month(#08/04/99#)%>
  RESULT: 8
-------------------------------------
  
30. MonthName()
  FUNCTION: Returns a string identifying th