<% Function Test(str) dim intLen,i,strTemp,aryTest intLen = Len(str) strTemp = "" aryTest = Split(str,",") For i = LBound(aryTest) to UBound(aryTest) If Instr(1,strTemp,aryTest(i)) = 0 Then strTemp = Trim(strTemp) & aryTest(i) & "," End If Next Test = strTemp End Function %> 之后 aa=test(str) ss=left(aa,len(aa)-1) 输出ss即可