如果列表中有下一个元素,如何在ASP中测试? 我正在尝试做这样的事情:
a=Split("foo, boo, luu, bar", ",")
for each x in a
response.write("'" & x & "'")
if a.HasNext then
response.write(",")
end if
next
它是如何运作的?
谢谢!
答案 0 :(得分:2)
没有HasNext,但你可以测试数组的大小
a=Split("foo, boo, luu, bar", ",")
i = 0
for each x in a
response.write("'" & x & "'")
if i < Ubound(a) then
response.write(",")
end if
i = i + 1
next