Function cutStr(str,strlen) '去掉所有HTML标记 Dim re Set re=new RegExp re.IgnoreCase =True re.Global=True re.Pattern="<(.[^>]*)>" str=re.Replace(str,"") set re=Nothing Dim l,t,c,i l=Len(str) t=0 For i=1to l c=Abs(Asc(Mid(str,i,1))) If c>255Then t=t+2 Else t=t+1 EndIf If t>=strlen Then cutStr=left(str,i)&"..." ExitFor Else cutStr=str EndIf Next cutStr=Replace(cutStr,chr(10),"") cutStr=Replace(cutStr,chr(13),"") End Function