textarea 中的新行 <br> 未解释
New line in textarea <br> not interpreted
我非常累 = 非常愚蠢,但我想在早上继续做这件事...
<div class=' form-group smhTextArea removeForAjax' style='margin-bottom: 10px'>
<div class=''>
<textarea class='form-control message-text-area' rows='4'
name='message<?= $jj ?>' placeholder='New text box <?= $jj ?>'
id='message<?= $jj ?>' >
ID <?= $jj ?> "\n" <br> Msg:<?= $stackContent ?><br>
</textarea>
</div>
</div>
输出结果为:
ID 1 "\n" <br> Msg:4 Mary had a little lamb it's... ??? @ "<br>
我在这里看了很多答案并进行了搜索Google,但什么也看不到。
如果此 应该 工作,则可能是目前这是一个格式非常错误的测试页。
再一次抱歉,如果你愚蠢但在这里昏倒了!
<textarea>
元素不呈现 HTML,它实际上呈现纯文本,如其在 HTML 文件中的格式。因此,这意味着您不必使用 <br />
标记来开始新行,而只需使用常规换行符(按键盘上的 return 键)。
<textarea>Line 1
Line 2
Line 4
</textarea>
您需要使用 CR/LF
而不是 <BR>
<textarea> ID 1 "\n" Msg:4 Mary had a little lamb it's... ??? @ "</textarea>
我非常累 = 非常愚蠢,但我想在早上继续做这件事...
<div class=' form-group smhTextArea removeForAjax' style='margin-bottom: 10px'>
<div class=''>
<textarea class='form-control message-text-area' rows='4'
name='message<?= $jj ?>' placeholder='New text box <?= $jj ?>'
id='message<?= $jj ?>' >
ID <?= $jj ?> "\n" <br> Msg:<?= $stackContent ?><br>
</textarea>
</div>
</div>
输出结果为:
ID 1 "\n" <br> Msg:4 Mary had a little lamb it's... ??? @ "<br>
我在这里看了很多答案并进行了搜索Google,但什么也看不到。
如果此 应该 工作,则可能是目前这是一个格式非常错误的测试页。
再一次抱歉,如果你愚蠢但在这里昏倒了!
<textarea>
元素不呈现 HTML,它实际上呈现纯文本,如其在 HTML 文件中的格式。因此,这意味着您不必使用 <br />
标记来开始新行,而只需使用常规换行符(按键盘上的 return 键)。
<textarea>Line 1
Line 2
Line 4
</textarea>
您需要使用 CR/LF
而不是 <BR>
<textarea> ID 1 "\n" Msg:4 Mary had a little lamb it's... ??? @ "</textarea>