Detailed explanation of the solution to the problem of saving format in HTML's TextArea

高洛峰
Release: 2017-03-07 11:00:54
Original
1177 people have browsed it

There is a problem with saving the format in TextArea of HTML. /n cannot be converted to each other, so the page cannot be displayed in the format at the beginning, so the following is the specific solution. The format of textarea can be saved to the database when saving, but when displaying, because /n and cannot be converted to each other, the page cannot be displayed in the format at the beginning, so when the page is displayed, a layer must be nested outside the value.

tag, that is,

code is as follows:

< pre >${model.name}
Copy after login

For more detailed explanations on how to solve the problem of saving format in HTML's TextArea, please pay attention to the PHP Chinese website for related articles !

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!