ASP 系列函數大全(3)
發表于:2007-06-30來源:作者:點擊數:
標簽:
返回結果: False IsNumeric() 函數判斷一對象是否為數字,返回布爾值. 表達式 IsNumeric(expression) 實例: % i = "345" response.write IsNumeric(i) %> 返回結果: True 就算數字加了引號,ASP還是認為它是數字。 IsObject() 函數判斷一對象是否為對象,返
返回結果: False
IsNumeric()
函數判斷一對象是否為數字,返回布爾值.
表達式 IsNumeric(expression)
實例: <%
i = "345"
response.write IsNumeric(i)
%>
返回結果: True
就算數字加了引號,ASP還是認為它是數字?!?
IsObject()
函數判斷一對象是否為對象,返回布爾值.
表達式 IsObject(expression)
實例: <%
Set con = Server.CreateObject("ADODB.Connection")
response.write IsObject(con)
%>
返回結果: True
LBound()
函數返回指定數組維的最小可用下標.
表達式 Lbound(arrayname [, dimension])
實例: <%
i = Array("Monday","Tuesday","Wednesday")
response.write LBound(i)
%>
返回結果: 0
LCase()
函數 返回字符串的小寫形式
表達式 Lcase(string)
實例: <%
strTest = "This is a test!"
response.write LCase(strTest)
%>
返回結果: this is a test!
Left()
函數返回字符串左邊第length個字符以前的字符(含第length個字符).
表達式 Left(string, length)
實例: <%
strTest = "This is a test!"
response.write Left(strTest, 3)
%>
返回結果: Thi
Len()
函數返回字符串的長度.
表達式 Len(string | varName)
實例: <%
strTest = "This is a test!"
response.write Len(strTest)
%>
返回結果: 15
LTrim()
函數去掉字符串左邊的空格.
表達式 LTrim(string)
實例: <%
strTest = " This is a test!"
response.write LTrim(strTest)
%>
返回結果: This is a test!
Mid()
函數返回特定長度的字符串(從start開始,長度為length).
表達式 Mid(string, start [, length])
實例: <%
strTest = "This is a test! Today is Monday."
response.write Mid(strTest, 17, 5)
%>
返回結果: Today
Minute()
函數返回時間的分鐘.
表達式 Minute(time)
實例: <%=Minute(#12:45:32 PM#)%>
返回結果: 45
Month()
函數返回日期.
表達式 Month(date)
實例: <%=Month(#08/04/99#)%>
返回結果: 8
MonthName()
函數返回指定月份
表達式 MonthName(month, [, Abb])
實例: <%=MonthName(Month(#08/04/99#))%>
返回結果: August
Now()
函數返回系統時間
表達式 Now()
實例: <%=Now%>
返回結果: 9/9/00 9:30:16 AM
Right()
函數返回字符串右邊第length個字符以前的字符(含第length個字符).
表達式 Right(string, length)
實例: <%
strTest = "This is an test!"
response.write Right(strTest, 3)
%>
返回結果: st!
Rnd()
函數產生一個隨機數.
表達式 Rnd [ (number) ]
實例: <%
Randomize()
原文轉自:http://www.kjueaiud.com