急,急,急,问个asp的for循环的问题?
来源:百度知道 编辑:UC知道 时间:2024/05/29 14:29:26
急,急,急,问个for循环的问题?
a=request.form("myreg")
for j=0 to 20
replace(a,[em0]&i,<img>http://127.0.0.1/01.jpg</img>)
next
急,有没办法从01到20的循环,好象for只可以0开始的,不能从01开始的
如果循环到了10的时候,[em0]&i就变成 em010了,这样字串里的em10就没办法被替换掉了,
怎么办?请指教一下!
a=request.form("myreg")
for j=0 to 20
replace(a,[em0]&i,<img>http://127.0.0.1/01.jpg</img>)
next
急,有没办法从01到20的循环,好象for只可以0开始的,不能从01开始的
如果循环到了10的时候,[em0]&i就变成 em010了,这样字串里的em10就没办法被替换掉了,
怎么办?请指教一下!
for j=0 to 20
jj = "0" & j
jj = right(jj,2)
replace(a,[em0]&i,<img>http://127.0.0.1/01.jpg</img>)
next
jj 就能达到你的要求了
a=request.form("myreg")
for j=0 to 9
replace(a,[em0]&i,<img>http://127.0.0.1/01.jpg</img>)
next
for j=10 to 20
replace(a,[em]&i,<img>http://127.0.0.1/01.jpg</img>)
next
分开