Home > Article > Web Front-end > How to convert textarea text into html, that is, carriage return and line feed
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!