<%
'******************************
'函数:MoveR(Rstr)
'参数:Rstr,以逗号做分隔的数组
'描述:去除数组中重复的项
'示例:MoveR("1,2,2,2,3,3,4,a,45,5,6,6")
'******************************
Function MoveR(Rstr)
Dim i,SpStr
SpStr = Split(Rstr,",")
For i = 0 To Ubound(Spstr)
If I = 0 then
MoveR = MoveR & SpStr(i) & ","
Else
If instr(MoveR,SpStr(i))=0 and i=Ubound(Spstr) Then
MoveR = MoveR & SpStr(i)
Elseif instr(MoveR,SpStr(i))=0 Then
MoveR = MoveR & SpStr(i) & ","
End If
End If
Next
End Function
xxxlei = "1,2,2,2,3,3,4,a,45,5,6,6"
response.write "原来的:" & xxxlei
response.write "处理过的:" & MoveR(xxxlei)
%>