学院首页>网络编程>ASP>ASP实用函数库

ASP实用函数库

作者: 来源: 添加时间:2006-5-21 18:40:42
Instr()
 FUNCTION: 返回字符或字符串在另一个字符串中第一次出现的位置.
 SYNTAX: Instr([start, ] strToBeSearched, strSearchFor [, compare])
 ARGUMENTS: Start为搜索的起始值,strToBeSearched接受搜索的字符串 
strSearchFor要搜索的字符.compare比较方式(详细见ASP常数)
 EXAMPLE: <%
strText = "This is a test!!"
pos = Instr(strText, "a")
response.write pos
%>
 RESULT: 9
 
InstrRev()
 FUNCTION: 同上,只是从字符串的最后一个搜索起
 SYNTAX: InstrRev([start, ] strToBeSearched, strSearchFor [, compare])
 ARGUMENTS: 同上.
 EXAMPLE: <%
strText = "This is a test!!"
pos = InstrRev(strText, "s")
response.write pos
%>
 RESULT: 13

Int()
 FUNCTION: 返回数值类型,不四舍五入,注意取值是不大于它的整数。
 SYNTAX: Int(number)
 ARGUMENTS: 
 EXAMPLE: <%=INT(32.89)%>  <%=int(-3.33)%>
 RESULT: 32  -4
 
IsArray()
 FUNCTION: 判断一对象是否为数组,返回布尔值 .
 SYNTAX: IsArray(name)
 ARGUMENTS: 
 EXAMPLE: <%
strTest = "Test!"
response.write IsArray(strTest)
%>
 RESULT: False

第 04 页,共 10 页 [01] [02] [03] [04] [05] [06] [07] [08] [09] [10]
站内搜索