Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的问题与用户在 jquery 中按下回车键时将 <br/> 添加到文本框中的问题相同
我得到了,br但我想<br>在用户按下回车时隐藏字符,我不想<br>在文本框中显示。
br
<br>
通过文本框,我假设您正在谈论文本区域。那么你应该添加一个\n而不是一个BR。
\n