表格里的文字如何自动换行? 你要自己编一个程序,把字符串中的'/n'变成<br> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你可以参考一下我写的程序:public String getStrbate(String tmp){ int SPos = 0; int EPos = 0; int countTotal = tmp.length(); String strMid = ""; String strEnd = ""; for (EPos=0;EPos<countTotal;EPos++){ char c = tmp.charAt(EPos); if (c==13){ if (SPos!=EPos){ strMid = tmp.substring(SPos,EPos); strEnd = strEnd + strMid + "<br>"; }else{ strEnd = strEnd + "<br>"; } SPos = EPos + 2; } } if (SPos<countTotal){ strMid = tmp.substring(SPos,EPos); strEnd = strEnd + strMid + "<br>"; } return strEnd;} Ext下拉列表不能显示问题 opcms 汉化问题 native2ascii 命令的怪现象,现在我还不知其所以然 关于web服务器配置问题? tomcat与iis的集成问题 如何用在jsp网页从文本文件提取数据,然后存储到数据库中? POI读取Excel文件的日期型数据有问题 如何实现动态数据的锚点链接操作?在线等,谢谢各位了 关于一个session问题,麻烦大家帮帮忙 为何insert语句在access中可执行,在jsp里执行数据无法加入表中呢! 如何得到按纽的value? 请问那里有jsp的免费空间????
public String getStrbate(String tmp)
{
int SPos = 0;
int EPos = 0;
int countTotal = tmp.length();
String strMid = "";
String strEnd = "";
for (EPos=0;EPos<countTotal;EPos++){
char c = tmp.charAt(EPos);
if (c==13){
if (SPos!=EPos){
strMid = tmp.substring(SPos,EPos);
strEnd = strEnd + strMid + "<br>";
}else{
strEnd = strEnd + "<br>";
}
SPos = EPos + 2;
}
}
if (SPos<countTotal){
strMid = tmp.substring(SPos,EPos);
strEnd = strEnd + strMid + "<br>";
}
return strEnd;
}