关于ASP循环

来源:百度知道 编辑:UC知道 时间:2024/05/24 07:24:56
现在我写出的asp循环是1|2|3|4|5|6|7|8|9|
我想要一个这样的循环1|2|3|4|5|6|7|8|9

这样不就行了
<%
for i=1 to 9
if i<>9 then
response.write(i & "|")
else
response.write(i)
end if
next
%>

可以先处理好了最后再一次性输出,这样效率还更高
<%
for i=1 to 9
    s=s & i & "|"
next
s=left(s,len(s)-1)
response.Write(s)
%>