Home  >  Article  >  Web Front-end  >  Detailed explanation of the solution to the problem of saving format in HTML's TextArea

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

高洛峰
高洛峰Original
2017-03-07 11:00:541205browse

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}</ pre >

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 !

Statement:
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