2013年9月25日 星期三

去除HTM標籤

<%
Function RemoveHTML(strText)
 Set re=New RegExp
 re.Pattern="<[^>]*>"
 re.Global=True
 strText=Replace(strText,"<BR>",chr(10))
 strText=Replace(strText,"<Br>",chr(10))
 strText=Replace(strText,"<bR>",chr(10))
 strText=Replace(strText,"<br>",chr(10))
 RemoveHTML=re.Replace(strText,"")
End Function
%>

<textarea cols="54" rows="12"><%=RemoveHTML(x)%></textarea>