快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

ASP 函数介绍(二)

24.函?堤case()
功能:?⒁蛔址???型??量的字符全部???Q小??字符.
格式:Lcase(string)
???岛string是字串??量
例子:
<%
str="THIS is Lcase!"
response.write Lcase(str)
%>
劫果:this is lcase!
25.函?奠eft()
功能:截取一??字符串的前部分;
格式:left(string,length)
???岛string字符串,length截取的樘度.
例子: <% =left("this is a test!",6) %>
劫果:this i
26.函?奠en()
功能:返回字符串樘度或者??量的字??樘度
格式:len(string |varname)
???岛string字符串;varname任意的??量名费
例子:
<%
strtest="this is a test!"
response.write left(strtest)
%>
劫果:15
27.函?奠trim()
功能:去掉字符串前的空格.
格式:ltrim(string)
???岛string 字串.
例子: <% =ltrim (" this is a test!")
劫果:this is a test!
28.函?低id()
功能:?淖执?中截取字串.
格式:mid(string,start [,length])
???岛string字串,start截取的起?c,length要截取的樘度.
例子:
<%
strtest="this is a test, Today is Monday!"
response.write mid(strtest,17,5)
%>
劫果:Today
29.函?淀inute()
功能:返回一?抵惮 表示分??
格式:minute(time)
???岛 time是?r殓??量
例子lt;% =minute(#12:23:34#) %>
劫果:23
30.函?淀onth()
功能:返回一?抵惮 表示月份
格式:month(time)
???岛time是日期??量
例子<% =month(#08/09/99) %>
劫果:9
31.函?淀onthname()
功能:返回月份的字符串(名费).
格式:Monthname(date [,abb])
???岛date是日期??量,abb=true?r ?t月份的矿??,
例子:
<% =monthname(#4/5/99#) %>
劫果:April
32.函?滴ow()
功能:返回系靳的??前?r殓和日期.
格式:now()
???岛?o
例子:
<% =now() %>
劫果: 05/10/00 8:45:32 pm
33.函?岛replace()
功能:在字串中查找,替代指定的字串.
格式:replace(strtobesearched,strsearchfor,strreplacewith [,start[,count[,compare]]])
???岛strtobesearched是字串; strsearchfor是被查找的子字串;strreplacewith 是用?硖娲?的子字串.start,count,compare 是任意啉??.
例子:
<%
strtest="this is an apple."
response.write replace(strtest,"apple","orange")
%>
劫果:this is an orange.
34.函?凋ight()
功能:截取一??字符串的后部分
格式:right(string,length)
???岛string字符串,length截取的樘度.
例子:
<%
strtest="this is a test!"
response.write right(strtest,3)
%>
劫果:st!
35.函?凋nd()
功能:返回一??胗机?抵导br> 格式:rnd[(number)]
???岛number是任意?抵诞
例子:
<%
randomize()
response.write rnd()
%>
劫果:0/1?抵抵?一,?orandomize(), ?t不能?a生胗机?诞
36.函?凋ound()
功能:完整?抵导br> 格式:round(expression[,numright])
???岛expression?底直磉_式;numright任意啉??.
例子:
<%
i=12.33654
response.write round(i)
%>
劫果: 12
37.函?凋trim()
功能:去掉字符串后的空格.
格式:rtrim(string)
???岛string 是字串
例子:
<%
response.write rtrim("this is a test! ")
%>
劫果:this is a test!
38.函?刁econd()
功能:返回一??整?抵诞
格式:second(time)
???岛time是一??有效的?r殓表哌式;
例子lt;% =second(# 12:28:30#) %>
劫果:30
39.函?刁trReverse()
功能:返回与原字串排列逆向的字串.
格式:strreverse(string)
???岛string是字串
例子<% =strreverse("this is a test!")
劫果:!tset a si siht
40.函?掉ime()
功能:返回??前系靳的?r殓值.
格式:time()
???岛?o
劫果:9:58:28 Am
41.函?掉rim()
功能:?h去字符串前,后的空格.
格式:trim(string)
???岛string 字串.
例子:
<%
strtest=" this is a test! "
response.write trim(strtest)
%>
劫果:this is a test!
42.函?嫡Bound()
功能:返回一???到M的上界.
格式:Ubound(expression [,dimension])
???岛expression 是?到M表哌式/?到M??量,dimension 是任意??
例子:
<%
i = array("1","2","3")
response.write ubound(i)
%>
劫果: 2
43.函?岛UCase()
功能:?⒁蛔址???型??量的字符全部???Q成大??字符.
格式:Ucase(string)
???岛string是字串??量
例子:
<%
str="THIS is Lcase!"
response.write Lcase(str)
%>
劫果:THIS IS LCASE!
44.函?抵artype()
功能:返回??量的常量代瘁(整?旦
格式:Vartype(varname)
???岛varname是任何??型的??量名费.
例子:
<%
i=5
response.write vartype(i)
%>
劫果:2 (2表示整?惮??要?⒖剂SP常量代瘁.)
45.函?底eekday()
功能:返回一??整?惮????一周中的第几天.
格式:Weekday(date [,firstofweek])
???岛date?槿掌谧?量,firstofweek?槿芜x??.
例子:
<%
d= # 5/9/00 #
response.write weekday(d) %>
劫果:3(3 表示是星期二)
46.函?调eekdayname()
功能:返回字串,????星期几.
格式:weekdayname(weekday[,abb[,firstdayofweek]])
???岛weekday?槿掌谧?量,abb,firstdayofweek?槿芜x??.
例子:
<%
d = #8/4/99#
response.write weekdayname(d)
%>
劫果: Wednesday
47.函?爹ear()
功能:返回日期表哌式所在的年份.
格式:year(date)
???岛date是有效的日期表哌式
例子:
<% =year(#8/9/99#) %>
劫果:1999
返回类别: 教程
上一教程: DW+ASP 玩转动态二级菜单
下一教程: ASP获取数据库表名,字段名以及对字段的一些操作

您可以阅读与"ASP 函数介绍(二)"相关的教程:
· Asp 函数介绍(一)
· ASP 函数介绍(一)
· ASP分页函数
· ASP中一些FSO方面的函数
· 利用CDONTS发送邮件的ASP函数
    微笑服务 优质保证 索取样品