当前位置: 技术问答>java相关
JAVA如何转化HTML tag为可显示代码?如:将<p>转化为 >p<
来源: 互联网 发布时间:2014-12-23
本文导语: | //用于实现ASP中的Server.HtmlEncode()同等的功能 public static final String escapeHTML(String s){ StringBuffer sb = new StringBuffer(); int n = s.length(); for (int i = 0; i
|
//用于实现ASP中的Server.HtmlEncode()同等的功能
public static final String escapeHTML(String s){
StringBuffer sb = new StringBuffer();
int n = s.length();
for (int i = 0; i
public static final String escapeHTML(String s){
StringBuffer sb = new StringBuffer();
int n = s.length();
for (int i = 0; i