C#寫法javascript
public static string StripHTML(string strHtml) { string strOutput = strHtml; Regex regex = new Regex(@"<[^>]+>|</[^>]+>"); strOutput = regex.Replace(strOutput, ""); return strOutput; }
javascript寫法java
e.DesText = e.BannerDes.replace(/<[^>]+>/g, "").replace(/&[^;]+;/g, "");
後面的是替換特殊的字符,如空格,大於號小於號之類的spa