asp 字符串中插入字符串
aa="1,2,4,6,7,8"split(aa,",")(0)为1split(aa,",")(1)为2split(aa,",")(2)为4...我想在split(aa,...
aa="1,2,4,6,7,8"
split(aa,",")(0) 为 1
split(aa,",")(1) 为 2
split(aa,",")(2) 为 4
...
我想在split(aa,",")(1)前面插入字符串,应该如何写呢 展开
split(aa,",")(0) 为 1
split(aa,",")(1) 为 2
split(aa,",")(2) 为 4
...
我想在split(aa,",")(1)前面插入字符串,应该如何写呢 展开
2个回答
展开全部
<%
aa="1,2,4,6,7,8"
arr = split(aa,",")
DIM arr1()
REDIM arr1(ubound(arr)+1)
for i = 0 to ubound(arr)+1
if i = 0 then
arr1(i) = arr(i)
else
if i = 1 then
arr1(i) = "xxxx"
else
arr1(i) = arr(i-1)
end if
end if
response.Write arr1(i)&"<br>"
next
response.End()
%>
aa="1,2,4,6,7,8"
arr = split(aa,",")
DIM arr1()
REDIM arr1(ubound(arr)+1)
for i = 0 to ubound(arr)+1
if i = 0 then
arr1(i) = arr(i)
else
if i = 1 then
arr1(i) = "xxxx"
else
arr1(i) = arr(i-1)
end if
end if
response.Write arr1(i)&"<br>"
next
response.End()
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询