濮阳杆衣贸易有限公司

主頁 > 知識庫 > ASP函數(shù)大全解析

ASP函數(shù)大全解析

熱門標簽:地圖標注中心多少錢注冊 不封卡外呼系統(tǒng)一般多少錢 重慶外呼電銷系統(tǒng)費用 地圖標注不完整被罰款 鄭州語音電銷機器人官網(wǎng) 微信地圖標注有什么用 濰坊呼叫中心外呼系統(tǒng)供應商 電銷機器人一個多少錢 北京大興區(qū)地圖標注

Array() 
函數(shù)返回一個數(shù)組
表達式 Array(list)
允許數(shù)據(jù)類型: 字符,數(shù)字均可
實例:

%
Dim myArray()
For i = 1 to 7
Redim Preserve myArray(i)
myArray(i) = WeekdayName(i)
Next
%>

返回結果: 建立了一個包含7個元素的數(shù)組myArray
myArray("Sunday","Monday", ... ... "Saturday") 

CInt()
函數(shù)將一個表達式轉化為數(shù)字類型
表達式 CInt(expression)
允許數(shù)據(jù)類型: 任何有效的字符均可
實例:

%
f = "234"
response.write cINT(f) + 2
%>

返回結果: 236
轉化字符"234"為數(shù)字"234",如果字符串為空,則返回0值

 

CreateObject()
函數(shù)建立和返回一個已注冊的ACTIVEX組件的實例。
表達式 CreateObject(objName)
允許數(shù)據(jù)類型: objName 是任何一個有效、已注冊的ACTIVEX組件的名字.
實例: 

%
Set con = Server.CreateObject("ADODB.Connection")
%>

CStr()
函數(shù)轉化一個表達式為字符串.
表達式 CStr(expression)
允許數(shù)據(jù)類型: expression 是任何有效的表達式。
實例: 

%
s = 3 + 2
response.write "The 返回結果 is: "  cStr(s)
%>

返回結果: 轉化數(shù)字“5”為字符“5”。

Date() 
函數(shù)返回當前系統(tǒng)日期.
表達式 Date()
允許數(shù)據(jù)類型: None.
實例: 

%=Date%>

返回結果: 9/9/00


DateAdd() 
函數(shù)返回一個被改變了的日期。
表達式 DateAdd(timeinterval,number,date)
允許數(shù)據(jù)類型:
timeinterval is the time interval to add;
number is amount of time intervals to add;
and date is the starting date.
實例: 

%
currentDate = #9/9/00#
newDate = DateAdd("m",3,currentDate)
response.write newDate
%>
%
currentDate = #12:34:45 PM#
newDate = DateAdd("h",3,currentDate)
response.write newDate
%>

返回結果: 

9/9/00
3:34:45 PM
"m" = "month";
"d" = "day";
If currentDate is in time format then,
"h" = "hour";
"s" = "second";

DateDiff() 
函數(shù)返回兩個日期之間的差值 。
表達式 DateDiff(timeinterval,date1,date2 [, firstdayofweek [, firstweekofyear]])
允許數(shù)據(jù)類型: timeinterval 表示相隔時間的類型,如“M“表示“月”。
實例:

%
fromDate = #9/9/00#
toDate = #1/1/2000#
response.write "There are "  _
DateDiff("d",fromDate,toDate)  _
" days to millenium from 9/9/00."
%>

返回結果: 從9/9/00 到2000年還有 150 天.

Day() 
函數(shù)返回一個月的第幾日 .
表達式 Day(date)
允許數(shù)據(jù)類型: date 是任何有效的日期。
實例: 

%=Day(#9/9/00#)%>

返回結果: 4

FormatCurrency() 
函數(shù)返回表達式,此表達式已被格式化為貨幣值
表達式 FormatCurrency(Expression [, Digit [, LeadingDigit [, Paren [, GroupDigit]]]])
允許數(shù)據(jù)類型: Digit 指示小數(shù)點右側顯示位數(shù)的數(shù)值。默認值為 -1,指示使用的是計算機的區(qū)域設置; LeadingDigit 三態(tài)常數(shù),指示是否顯示小數(shù)值小數(shù)點前面的零。
實例:

 %=FormatCurrency(34.3456)%>

返回結果: $34.35

以上就是ASP函數(shù)大全的全部內(nèi)容,希望對大家的學習有所幫助。

您可能感興趣的文章:
  • ASP防止圖片木馬上傳的代碼
  • 如何防范ASP木馬
  • asp防止上傳圖片木馬原理解析

標簽:鶴崗 海南 揭陽 撫州 佛山 攀枝花 汕頭 唐山

巨人網(wǎng)絡通訊聲明:本文標題《ASP函數(shù)大全解析》,本文關鍵詞  ASP,函數(shù),大全,解析,ASP,函數(shù),;如發(fā)現(xiàn)本文內(nèi)容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《ASP函數(shù)大全解析》相關的同類信息!
  • 本頁收集關于ASP函數(shù)大全解析的相關信息資訊供網(wǎng)民參考!
  • 推薦文章
    沙湾县| 铜陵市| 金平| 都昌县| 寿阳县| 清苑县| 杭州市| 葵青区| 哈巴河县| 泰来县| 惠来县| 金堂县| 东阳市| 临夏市| 聊城市| 淅川县| 岱山县| 福安市| 商都县| 高碑店市| 曲阜市| 双柏县| 怀宁县| 会宁县| 淳安县| 神池县| 台北市| 襄樊市| 阳春市| 江达县| 德钦县| 黄大仙区| 怀集县| 吕梁市| 南汇区| 黑龙江省| 衡阳市| 吉首市| 永登县| 常熟市| 长治县|