1.數組長度:node
- <%
- Dim grade,i
- grade=split("1,2,5,10,20,50,100,200,500,1000",",")
- for i=0 to ubound(grade)
- response.write grade(i)&"\n"
- next
- %>
2.得到插入的idsql
- set rs = server.createobject("adodb.recordset")
- sql="select * from node"
- rs.Open sql,conn,1,3
- rs.addnew
- rs("name") = node_name
- rs.update
- rs.movelast
- node_id = rs("id")
- rs.close
3.函數返回值,每個月最後一天數組
ide
- <%
- function getlastday()
- Dim ThisDate,NextDate
- ThisDate = Date()
- NextDate = DateAdd("m", 1, ThisDate)
- getlastday=Day(DateAdd("d", -1, Year(NextDate) & "-" & Month(NextDate) & "-1"))
- end function
- response.write getlastday()
- %>
4.時間函數函數spa
- <%
- function getnow()
- Dim ThisDate
- ThisDate = now()
- getnow=Year(ThisDate)& "-" & Month(ThisDate) & "-" & Day(ThisDate)& " " & Hour(ThisDate) & ":" & Minute(ThisDate)& ":" & Second(ThisDate)
- end function
- response.write getnow()
- %>
5.特殊符號常數 值 描述vbCr Chr(13) 回車符。vbCrLf Chr(13) & Chr(10) 回車符與換行符。vbFormFeed Chr(12) 換頁符;在 Microsoft Windows 中不適用。vbLf Chr(10) 換行符。vbNewLine Chr(13) & Chr(10) 或 Chr(10) 平臺指定的新行字符;適用於任何平臺。vbNullChar Chr(0) 值爲 0 的字符。vbNullString 值爲 0 的字符串 與零長度字符串 ("") 不一樣;用於調用外部過程。vbTab Chr(9) 水平附籤。vbVerticalTab Chr(11) 垂直附籤;在 Microsoft Windows 中不適用。