ASP 系列函数大全(4)

函数

   Rnd() 
   
  函数产生一个随机数. 
   
  表达式 Rnd [ (number) ] 
   
  实例: <% 
   
  Randomize() 
  response.write RND() 
   
  %> 
   
  返回结果: 任何一个在0 到 1 之间的数 
   
   
  Round() 
   
  函数返回按指定位数进行四舍五入的数值. 
   
  表达式 Round(expression [, numRight]) 
   
  实例: <% 
   
  i = 32.45678 
   
  response.write Round(i) 
   
  %> 
   
  返回结果: 32 
   
   
  Rtrim() 
   
  函数去掉字符串右边的字符串. 
   
  表达式 Rtrim(string) 
   
  实例: <% 
   
  strTest = "This is a test!! " 
   
  response.write RTrim(strTest) 
   
  %> 
   
  返回结果: This is a test!! 
   
   
  Split() 
   
  函数将一个字符串分割并返回分割结果 
   
  表达式 Split (S[,d]) 
   
  实例:<%V= Split(A,B,C) 
   
  For i = 0 To UBound(V) 
   
  Response.Write V(i) 
   
  Next 
   
  %> 
   
  返回结果: A B C 
   
   
  Second() 
   
  函数返回秒. 
   
  表达式 Second(time) 
   
  实例: <%=Second(#12:34:28 PM#)%> 
   
  返回结果: 28 
   
   
  StrReverse() 
   
  函数反排一字符串 
   
  表达式 StrReverse(string) 
   
  实例: <% 
   
  strTest = "This is a test!!" 
   
  response.write StrReverse(strTest) 
   
  %> 
   
  返回结果: !!tset a si sihT 
   
   
  Time() 
   
  函数返回系统时间. 
   
  表达式 Time() 
   
  实例: <%=Time%> 
   
  返回结果: 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

时间: 2024-09-03 01:09:37

ASP 系列函数大全(4)的相关文章

ASP 系列函数大全(1)

函数    ASP函数大全   ASP函数与VBSCRIPT类似,以下举一些常用的函数      Array()      函数返回一个数组      表达式 Array(list)      允许数据类型: 字符,数字均可      实例: <%      Dim myArray()      For i = 1 to 7      Redim Preserve myArray(i)      myArray(i) = WeekdayName(i)      Next      %>   

ASP 系列函数大全

ASP函数大全 ASP函数与VBSCRIPT类似,以下举一些常用的函数 Array() 函数返回一个数组 表达式 Array(list) 允许数据类型: 字符,数字均可 实例: <% Dim myArray() For i = 1 to 7 Redim Preserve myArray(i) myArray(i) = WeekdayName(i) Next %> 返回结果: 建立了一个包含7个元素的数组myArray myArray("Sunday","Monda

ASP 系列函数大全(2)

函数    实例: <%=FormatCurrency(34.3456)%>      返回结果: $34.35         FormatDateTime()      函数返回表达式,此表达式已被格式化为日期或时间      表达式 FormatDateTime(Date, [, NamedFormat])      允许数据类型: NamedFormat 指示所使用的日期/时间格式的数值,如果省略,则使用 VBGeneralDate.      实例: <%=FormatDate

ASP 系列函数大全(3)

函数   返回结果: False         IsNumeric()      函数判断一对象是否为数字,返回布尔值.      表达式 IsNumeric(expression)      实例: <%      i = "345"      response.write IsNumeric(i)      %>      返回结果: True      就算数字加了引号,ASP还是认为它是数字.         IsObject()      函数判断一对象是否为对

ASP字符串函数大全

本文汇集了asp中常用函数 函数 语法 功能 Len Len(stringvarname) 返回字符串内字符的数目,或是存储一变量所需的字节数. Trim Trim(string) 将字符串前后的空格去掉 Ltrim Ltrim(string) 将字符串前面的空格去掉 Rtrim Rtrim(string) 将字符串后面的空格去掉 Mid Mid(string,start,length) 从string字符串的start字符开始取得length长度的字符串,如果省略第三个参数表示从start字符

asp 类型转换函数大全第1/2页_应用技巧

abs(number) 返回绝对值. array(arglist) 创建一个数组. asc(string) 返回字符串第一个字符的ansi码. atn(number) 返回反正弦值. cbool (expression) 转换成boolean数据类型变量. cbyte (expression) 转换成byte数据类型变量. ccur (expression) 转换成currency数据类型变量. cdate (expression) 转换成date数据类型变量. cdbl (expression

asp 类型转换函数大全第1/2页

abs(number) 返回绝对值. array(arglist) 创建一个数组. asc(string) 返回字符串第一个字符的ansi码. atn(number) 返回反正弦值. cbool (expression) 转换成boolean数据类型变量. cbyte (expression) 转换成byte数据类型变量. ccur (expression) 转换成currency数据类型变量. cdate (expression) 转换成date数据类型变量. cdbl (expression

ASP函数大全解析_ASP基础

Array() 函数返回一个数组表达式 Array(list)允许数据类型: 字符,数字均可实例: <% Dim myArray() For i = 1 to 7 Redim Preserve myArray(i) myArray(i) = WeekdayName(i) Next %> 返回结果: 建立了一个包含7个元素的数组myArraymyArray("Sunday","Monday", ... ... "Saturday") 

PHP载入图像imagecreatefrom_gif_jpeg_png系列函数用法分析_php技巧

本文实例分析了PHP载入图像imagecreatefrom_gif_jpeg_png系列函数用法.分享给大家供大家参考,具体如下: imagecreatefrom 系列函数用于从文件或 URL 载入一幅图像. 载入图像 imagecreatefrom 系列函数用于从文件或 URL 载入一幅图像,成功返回图像资源,失败则返回一个空字符串. 该系列函数有: imagecreatefromgif():创建一块画布,并从 GIF 文件或 URL 地址载入一副图像 imagecreatefromjpeg(