頁面有亂碼,這可以除亂碼

<%@ codepage=65001%>

 

用迴圈印出變數

<%
  Dim i
  For i=1 to 10
  Response.Write i & "<br>"
  Next
%>

用迴圈印出陣列變數

<%
  Dim i
  For i=0 to 4
  Response.Write mArray(i) & "<br>"
  Next
%>

 

陣列的使用一

mArray=Array("January", "February", "March", "April", "May")

Response.Write mArray(0) //印出January

陣列的使用二 + 呼叫方法傳值

<%

Function fetchmonth(num1,num2)

Dim mArray(1,1)
mArray(0,0)="a1"
mArray(0,1)="a2"
mArray(1,0)="b1"
mArray(1,1)="b2"

fetchmonth=mArray(num1,num2)
End Function


Response.Write "The day of the month is characters is " & fetchmonth(1,1) //印出b2
%>

 

 兩層for迴圈

<%
For i = 0 To 2
  For j = 0 To 1
    Response.Write faq(i,j)
  Next
Next
%>

 

多國語系 字串換行連接

<%
response.write "ilona" &_
"liao"
%>

<%
response.write "ilona" & "liao"
%>

 

arrow
arrow
    全站熱搜

    cabuchi 發表在 痞客邦 留言(1) 人氣()