日期:2014-05-17 浏览次数:21229 次
<% x="G003,G010,G009,G001,G007,G005," x=replace(x,",","<br>") %> <p> <% =x %> </p>
------解决方案--------------------
str="G003,G010,G009,G001,G007,G005," 可以使用正则替换gXX内容在替换掉逗号
UserIDxq="10,12,18,16" '----------->定义字符串变量要引号括起
sPic = split(UserIDxq, ",")
------解决方案--------------------
<%
strX="G003,G010,G009,G001,G007,G005"'这个是字符串
sessionY="01,02,03,04,05,06"'这个是session
'注意session里面的【,】的数量要等于字符串里面的【,】
x=split(strX,",")
y=split(sessionY,",")
for i=0 to ubound(x)
response.write "这是字符串"&left(x(i),2)&"这是session"&y(i)&"<br />"
next i%>
------解决方案--------------------
x="G003,G010,G009,G001,G007,G005,"
x=replace(x,",","<br>")
xarr=split(strX,"<br>")
yarr=split(sessionY,",")
for i=0 to ubound(xarr)
x=replace(x,xarr(i),yarr(i))
next