- ·上一篇文章:ASP开发技巧--页面与程序分离
- ·下一篇文章:asp函数---InStr()
ASP函数大全
bsp
9:58:28 
AM
Trim()
函数去掉字符串左右的空格.
表达式 
Trim(string)
实例: 
<
%
strTest 
= 
"
 
This 
is 
a 
test!! 
"
response.write 
Trim(strTest)
%>
返回结果: 
This 
is 
a 
test!!
UBound()
函数返回指定数组维数的最大可用下标>
.
表达式 
Ubound(arrayname 
[, 
dimension])
实例: 
<
%
i 
= 
Array("
Monday"
,"
Tuesday"
,"
Wednesday"
)
response.write 
UBound(i)
%>
返回结果: 
2
UCase()
函数返回字符串的大写形式.
表达式 
UCase(string)
允许数据类型:
实例: 
<
%
strTest 
= 
"
This 
is 
a 
test!!"
response.write 
UCase(strTest)
%>
返回结果: 
THIS 
IS 
A 
TEST!!
VarType()
函数返回指示变量子类型的值
表达式 
VarType(varName)
实例: 
<
%
i 
= 
3
response.write 
varType(i)
%>
返回结果: 
2(数字)详见"
asp常数"
WeekDay()
函数返回在一周的第几天.
表达式 
WeekDay(date 
[, 
firstdayofweek])
实例: 
<
%
d 
= 
#9/9/00
#
response.write 
Weekday(d)
%>
返回结果: 
4(星期三)
WeekDayName()
函数返回一周第几天的名字.
表达式 
WeekDayName(weekday 
[, 
Abb 
[, 
firstdayofweek]])
实例: 
<
%
d 
= 
#9/9/00
#
response.write 
WeekdayName(Weekday(d))
%>
返回结果: 
Wednesday
Year()
函数返回当前的年份.
表达式 
Year(date)
实例: 
<
%=Year(
#9/9/00
#)%>
返回结果: 
1999
9:58:28 
AM
Trim()
函数去掉字符串左右的空格.
表达式 
Trim(string)
实例: 
<
%
strTest 
= 
"
 
This 
is 
a 
test!! 
"
response.write 
Trim(strTest)
%>
返回结果: 
This 
is 
a 
test!!
UBound()
函数返回指定数组维数的最大可用下标>
.
表达式 
Ubound(arrayname 
[, 
dimension])
实例: 
<
%
i 
= 
Array("
Monday"
,"
Tuesday"
,"
Wednesday"
)
response.write 
UBound(i)
%>
返回结果: 
2
UCase()
函数返回字符串的大写形式.
表达式 
UCase(string)
允许数据类型:
实例: 
<
%
strTest 
= 
"
This 
is 
a 
test!!"
response.write 
UCase(strTest)
%>
返回结果: 
THIS 
IS 
A 
TEST!!
VarType()
函数返回指示变量子类型的值
表达式 
VarType(varName)
实例: 
<
%
i 
= 
3
response.write 
varType(i)
%>
返回结果: 
2(数字)详见"
asp常数"
WeekDay()
函数返回在一周的第几天.
表达式 
WeekDay(date 
[, 
firstdayofweek])
实例: 
<
%
d 
= 
#9/9/00
#
response.write 
Weekday(d)
%>
返回结果: 
4(星期三)
WeekDayName()
函数返回一周第几天的名字.
表达式 
WeekDayName(weekday 
[, 
Abb 
[, 
firstdayofweek]])
实例: 
<
%
d 
= 
#9/9/00
#
response.write 
WeekdayName(Weekday(d))
%>
返回结果: 
Wednesday
Year()
函数返回当前的年份.
表达式 
Year(date)
实例: 
<
%=Year(
#9/9/00
#)%>
返回结果: 
1999
ASP函数大全