回车在文本区域

编程入门 行业动态 更新时间:2024-10-27 14:29:32
本文介绍了回车在文本区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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.

更多推荐

回车在文本区域

本文发布于:2023-11-10 00:30:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573861.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本   区域

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!