Treatment method for automatic wrap in text area TEXTAREA data

xiaoxiao2021-03-05  19

When the data input by TextArea has a wrap, the data is transmitted to the server, and then the data is displayed. It is not seen that the user has a broken place. In fact, solve this problem is very simple, as follows:

After jdk1.4, there is a good way: ReplaceAll (). xxx.jsp

<%

String msg = Request.getParameter ("message"); string str = msg.replaceAll ("/ r / n", "
"); out.print (STR);

%>

转载请注明原文地址:https://www.9cbs.com/read-38455.html

New Post(0)