28,391
社区成员
发帖
与我相关
我的任务
分享
function replacetext(txt)
f_flag = 0
f_str = ""
f_txt = split(txt,",")
for fi = 0 to Ubound(f_txt)
if Trim(f_txt(fi)) <> "" then
f_flag = 1
if f_str <> "" then f_str = f_str & ","
f_str = f_str & f_txt(fi)
else
if f_flag = 1 And fi < Ubound(f_txt) Then
if f_str <> "" then f_str = f_str & ","
f_str = f_str & f_txt(fi)
End if
end if
Next
replacetext = f_str
end Function
a=",1,2,3,4,"
response.write mid(replace(","& a &",",",,",","),2,len(replace(","& a &",",",,",","))-2)