Home  >  Article  >  Web Front-end  >  How to convert textarea text into html, that is, carriage return and line feed

How to convert textarea text into html, that is, carriage return and line feed

php中世界最好的语言
php中世界最好的语言Original
2018-02-05 09:38:163890browse

This time I will show you how to convert the text of textarea into html, that is, carriage return and line feed, and how to convert the text of textarea into html, that is, carriage return and line feed. What are the precautions?. Here are the practical cases. Let’s take a look.

<%=内容值%>.Replace("\r\n", "</br>").Replace("\n", "</br>") %>

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to php Chinese website Other related articles!

Related reading

How to use iframe to embed other web pages in the current web page

How to add flash video format in html (flv, swf) files

How to set input to read-only effect through disabled and readonly

Google Browse How to solve the problem of spacing between label and input

How to use this in the label of html

HTML How to implement refresh redirection of header tag meta

The above is the detailed content of How to convert textarea text into html, that is, carriage return and line feed. For more information, please follow other related articles on the PHP Chinese website!

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