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

<%@ 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"
%>

 

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


留言列表 (1)

發表留言
  • Duncan
  • 你怎麼在看ASP....該不會被ㄠ去改舊的官網吧....
  • 舊官網要被砍掉~~~

    cabuchi 於 2013/02/26 11:07 回覆