Function ClearJSCode(originCode) Dim reg set reg = New RegExp reg.Pattern = "SCRIPT[^]*/SCRIPT>" reg.IgnoreCase = True reg.Global = True clearJSCode = reg.Replace(originCode, "") End Function
二、清除内容中的HTML代码
复制代码 代码如下:
Function ClearHTMLCode(originCode) Dim reg set reg = new RegExp reg.Pattern = "[^>]*>" reg.IgnoreCase = True reg.Global = True ClearHTMLCode = reg.Replace(originCode, "") End Function