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

ASP
ASP中数据库调用中常见错误的现象和解决方法
ASP取出HTML里面的图片地址的函数
关于分页查询和性能问题
利用Asp生成整站静态
用ASP+XMLHTTP编写一个天气预报程序
轻松检测浏览器是否接受Cookies信息
净化网络环境:ASP程序实现过滤脏话
入门:防范SQL注入攻击的新办法
如何对ASP.NET进行性能优化
ASP无法更新ACCESS数据库解决方法
ASP:利用ASP把图片上传到数据库
ASP:用ASP编程实现网络内容快速查找
ASP:用ASP打造一个小型的网页BBS系统
ASP:用Asp编程实现QQ的在线情况查询
通过表单创建word的一个例子
在ASP中轻松实现记录集分页显示
ASP中实现小偷程序的原理和简单示例
ASP:6行代码实现无组件上传
实用篇:用asp实现QQ在线查询
如何轻松打造ASP计数器

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


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