php里面定义数组是一件非常方便的事情,那么asp是否也可以定义数组和读取数组呢?这里找到一个例子给大家分享:
<%myArrayValue = Array("1","2","3","4")
myArrayName = Array("中国","美国","俄罗斯","欧盟")
%>
<label>用户分类:
<select name="bTypeId" style="padding:5px; margin-bottom:10px;">
<option value="0">未分组</option>
<%
for i=0 to ubound(myArrayValue)
%>
<option value="<%=myArrayValue(i)%>" <%if rs.fields("bTypeId")=myArrayValue(i) then
response.Write("selected='selected'")
end if %>><%=myArrayName(i)%></option>
<%
next
%>
</select>
</label>