伊图教程网[www.etoow.com]
http://www.etoow.com/html/2009-04/1238618315-1.html
"
End If
Next
注意程序如何从Application对象检索该数组。将其分配给一个局部(Variant)变量,使用下面的语句:
varArray = Application.Contents(objItem)
使用UBound函数可以查找出数组的大小(元素的数量),这个值可以作为遍历的终止条件:
For intLoop = 0 UBound(varArray)
这个例子是一维数组,并将只显示这样的一个数组的内容。可根据需要编辑代码以处理多维数组,例如:
For intLoop = 0 To UBound(varArray)
IntNumberOfDimensions = UBound(varArray, 1)
For intDimension = 0 To intNumberOfDimensions
Response.Write “ Index(“ & intLoop & “) = " _
& varArray(intLoop, intDimension)
Next
Response.Write “”
Next
ASP中遍历和操作Application对象的集合
'http://www.etoow.com/html/2009-04/1238618315-1.html