我有htmltext
<p>Here is what some pupils told me about how they prepared for and fared in yesterday's preliminary round.</p>
<hr />
<p>"I will stay calm and try my best. If I do not know a word, I will just have to put something down."</p>
<p><strong>some text</strong></p>
<hr />
<p>"I am more confident than last year because I have experience. I read the newspaper and I looked through the dictionary for difficult words and tagged them."</p>
<p><strong>some text</strong></p>
<hr />
我显示与textarea.htmlText相同的内容。
但textarea显示上面的内容,它们之间有太多空行。有没有办法可以删除文本中的换行符?文本来自服务器端。
答案 0 :(得分:0)
在CSS中设置p标签的样式 例如:
p{
line-height:0.5;
}