28,390
社区成员
发帖
与我相关
我的任务
分享
function GetValue(txt)
Dim Reg
set Reg= new RegExp
Reg.Global = True
Reg.IgnoreCase = True
Reg.MultiLine = True
Reg.Pattern = "<img [^\<\>]* >"
Reg.Replace(txt,"")
end function
Function ImgFilter(fString)
Dim regEx
Set regEx = New RegExp
regEx.Pattern = "<img.*?>"
regEx.Global = true
regEx.ignorecase = true
fString = regEx.Replace(fString,"")
ImgFilter = fString
End Function
<%
Str = "dddd <IMG src='/UploadFile/200841981251931.jpg' border=0>ssss"
Stt = InStr(Str, "<IMG")
Fnl = InStr(Str, ">")
Str = Left(Str, Stt-1) + Mid(Str, Fnl+1, Len(Str)-Fnl)
response.write Str
%>
'*************************************************************
'功 能:过滤HTML标签
'返回值:String
'参 数:
' fString : String 待过滤的带HTML的字符串
'*************************************************************
Function HTMLfilter(fString)
Dim regEx
Set regEx = New RegExp
regEx.Pattern = "<[^>]+>|</[^>]+>"
regEx.Global = true
fString = regEx.Replace(fString,"")
HTMLfilter = fString
End Function