Test code: Output simple ul li
1. asp
Copy codeThe Code is as follows: <%
Response. write "<ul>"
Response. write "<li> script home </li>"
Response. write "<li> www.jb51.net </li>"
Response. write "</ul>"
%>
The result is: Right-click the source file and you will seeCopy codeThe Code is as follows: <ul> <li> script home </li> <li> www.jb51.net </li> </ul>
1. You can use vbcrlf
Write codeCopy codeThe Code is as follows: <%
Response. write "<ul>" & vbcrlf
Response. write "<li> script home </li>" & vbcrlf
Response. write "<li> www.jb51.net </li>" & vbcrlf
Response. write "</ul>"
%>
The output source code isCopy codeThe Code is as follows: <ul>
<Li> foot home </li>
<Li> www.jb51.net </li>
</Ul>
Second: if it is a common file, you can use
Copy codeThe Code is as follows: response. write "<div> script home <br> www.jb51.net </div>"
Third: to display textarea and html in turn
In this case, the content is submitted through textarea instead of the webpage editing, so you need to replace the line feed of textarea with <br>
CHR (10) indicates line feed, and CHR (13) indicates carriage return.
In asp, you can use the constant vbcrlf and function: chr (13) for line breaks;Copy codeThe Code is as follows: response. write "Login successful" & vbcrlf & "welcome"
Content = replace (content, "vbcrlf", "<br> ")-
Replace the line feed in textarea with <br>Copy codeThe Code is as follows: fString = Replace (fString, CHR (10), "<br> ")
FString = Replace (fString, CHR (13), "<br> ")
In turn, the line feed of br in html must be replaced with the line feed in textarea.Copy codeThe Code is as follows: fString = Replace (fString, <br>, vbcrlf)
More specifically, you can test the program by writing it. Not shown.
Other statements
Recently, when I was writing an ASP program, I wanted my HTML code to be output directly in ASP and asked him to output it in a very neat format. I tried the long-used tabulation symbols \ n and \ t that I wrote for a long time and couldn't be directly output. So Liang long checked the relevant information on Baidu and posted it, this allows friends who are interested in Liang long and Liang Long's blogs to accumulate knowledge. When Liang long studied ASP, he didn't seem to care too much about it. Now, he can make up for eight. Okay, go to the above.
VbCr Chr (13) carriage return.
VbCrLf Chr (13) & Chr (10) returns and linefeeds.