CSDN博客

img 21aspnet

替换HTML代码

发表于2004/10/26 19:23:00  2152人阅读

将一些HTML替换掉

eg:
strContent=strContent.Replace("&","&amp");
strContent=strContent.Replace("'","''");
strContent=strContent.Replace("<","&lt");
strContent=strContent.Replace(">","&gt");
strContent=strContent.Replace("chr(60)","&lt");
strContent=strContent.Replace("chr(37)","&gt");
strContent=strContent.Replace("/"","&quot");
strContent=strContent.Replace(";",";");
strContent=strContent.Replace("/n","<br/>");
strContent=strContent.Replace(" ","&nbsp");
return strContent;

阅读全文
0 0

相关文章推荐

img
取 消
img