当前位置:编程学习 > JSP >>

替换HTML代码

将一些HTML替换掉
eg:
strContent=strContent.Replace("&","&");
strContent=strContent.Replace("'","''");
strContent=strContent.Replace("<","<");
strContent=strContent.Replace(">",">");
strContent=strContent.Replace("chr(60)","<");
strContent=strContent.Replace("chr(37)",">");
strContent=strContent.Replace(""",""");
strContent=strContent.Replace(";",";");
strContent=strContent.Replace(" ","<br/>");
strContent=strContent.Replace(" "," ");
return strContent;

补充:Jsp教程,面向对象编程
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,