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

ASP
在ASP应用中验证用户身份(2)
在ASP应用中验证用户身份(3)
在ASP应用中验证用户身份(4)
在ASP应用中验证用户身份(5)
用ASP开发一个在线考试程序(一)
用ASP开发一个在线考试程序(二)
用ASP开发一个在线考试程序(三)
用ASP开发一个在线考试程序(四)
用表单来提交sql - 1
用表单来提交sql - 2
用表单来提交sql - 3
让您的主页支持各种浏览设备(ASP+篇)(上)
如何用ASP编写网站统计系统(一)
如何用ASP编写网站统计系统(二)
如何用ASP编写网站统计系统(三)
如何用ASP编写网站统计系统(四)
一个免费的邮件列表源程序(一)
一个免费的邮件列表源程序(二)
一个免费的邮件列表源程序(三)
用密码保护页面 (I)

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 31 ::
收藏到网摘: 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