各位高手:
我的前台页面从 textarea 中输入内容,提交到后台插入到数据库,这都很正常。 但在从数据库提取内容显示的时候,我已经把内容trim() 和格式化输出了,但在 textarea 中显示的内容就在中中间间的,4面的边框都不靠,怎么样把他靠在第一排最左显示呀?<%
String tmp=rs.getString("xxx").trim(); tmp = tmp.replaceALL(tmp,"&","&");
tmp = tmp.replaceALL(tmp,"<", "<");
tmp = tmp.replaceALL(tmp,">",">");
tmp = tmp.replaceALL(tmp,"\n", "\r\n");
tmp = tmp.replaceALL(tmp,"<br>\n", "\n");
tmp = tmp.replaceALL(tmp," "," ");
tmp = tmp.replaceALL(tmp,"\n ", "\r\n");
tmp = tmp.replaceALL(tmp,"<br>\n ","\n");
tmp = tmp.replaceALL(tmp," ","\t");
%>
<textarea name="xxx" ><%=tmp%></textarea>这个时候显示的内容就在 textarea 中间,很难看,求高手解决。
我的前台页面从 textarea 中输入内容,提交到后台插入到数据库,这都很正常。 但在从数据库提取内容显示的时候,我已经把内容trim() 和格式化输出了,但在 textarea 中显示的内容就在中中间间的,4面的边框都不靠,怎么样把他靠在第一排最左显示呀?<%
String tmp=rs.getString("xxx").trim(); tmp = tmp.replaceALL(tmp,"&","&");
tmp = tmp.replaceALL(tmp,"<", "<");
tmp = tmp.replaceALL(tmp,">",">");
tmp = tmp.replaceALL(tmp,"\n", "\r\n");
tmp = tmp.replaceALL(tmp,"<br>\n", "\n");
tmp = tmp.replaceALL(tmp," "," ");
tmp = tmp.replaceALL(tmp,"\n ", "\r\n");
tmp = tmp.replaceALL(tmp,"<br>\n ","\n");
tmp = tmp.replaceALL(tmp," ","\t");
%>
<textarea name="xxx" ><%=tmp%></textarea>这个时候显示的内容就在 textarea 中间,很难看,求高手解决。
解决方案 »
- java.lang.NumberFormatException: For input string: "id"
- html5 + jquery 可以实现以下效果吗?
- 如何实现用JS代码检测当前浏览器,并强制只能用IE打开一个网页?
- web程序部署到linux+weblogic环境,报config.xml第二行问题,问题如下,请高手帮忙,谢谢
- 在jsp页面点击某一列,对表进行正序排序,再点击实现倒序排序-与分页不能共同实现
- 受老大之托,我要帮公司招一个程序员,那位老大有兴趣的请和我联系!
- 关于UI框架问题
- 网络设置问题----大神们,求解
- 请大家推荐几个国外的JSP站点
- springboot如何控制静态资源的权限
- sevlet中能否在使用多线程
- 当焦点落在TEXT控件上时,自动的选中文本框中的全部内容。怎么做???
这是我刚从系统里copy出来的,没有你说的那个问题啊