回车在文本区域

问题描述:

我要允许用户在文本区域中输入回车;是这样的:

I have to allow the user to enter carriage returns in text areas; something like:

1句
句子2

Sentence 1
Sentence 2
...

我有加载和保存数据时要坚持这些回车。 我使用jQuery在客户端和.NET服务器上。关于如何处理任何建议?

I have to persist those carriage returns when loading and saving data. I use jQuery on the client side, and .NET on the server. Any suggestions on how to approach?

感谢。

如果用坚持的换行符( CRLF )你的意思是要正确显示它,像这样做,你需要的记住更换 CRLF 对与< BR />。CRLF

If by "persist" the line breaks (CRLF) you mean that you want to display it properly, as SO does, you need to remeber to replace the CRLF pair with <br/>CRLF.

否则,所有的文本将相继出现。

Otherwise, all your text will appear sequentially.