|
|
ASP 系列函数大全 |
时间:2007-11-29 10:08:57 来源: 作者: 编辑:admin 【 关闭】浏览:
次 | |
IsDate() 函数判断一对象是否为日期,返回布尔值 表达式 IsDate(expression) 实例: <% strTest = "9/4/2000" response.write IsDate(strTest) %> 返回结果: True IsEmpty() 函数判断一对象是否初始化,返回布尔值. 表达式 IsEmpty(expression) 实例: <% Dim i response.write IsEmpty(i) %> 返回结果: True IsNull() 函数判断一对象是否为空,返回布尔值. 表达式 IsNull(expression) 实例: <% Dim i response.write IsNull(i)
%>
返回结果: 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! |
|
| 推荐精彩图片 |
|
|
|
| 信息评论 |
您要为您所发的言论的后果负责,故请各位遵纪守法并注意语言文明。 |
查看评论 |
|
|
| |
|