【发布时间】:2017-10-19 17:21:08
【问题描述】:
<h4>
<span class="title">
<textarea rows="4" cols="50"> How are you. </textarea>
</span>
</h4>
如何将<textarea rows="4" cols="50"> How are you. </textarea> 视为字符串而不是 HTML。我不希望 HTML 呈现,我只想要进入 div 或 span 它应该呈现的任何内容。
预期结果:<textarea rows="4" cols="50"> How are you. </textarea>
【问题讨论】:
-
@Parag Bhingre 上面的评论非常描述在 html 中转义 html 标签,我的回答也很相关。这些解决了你的问题吗?
标签: javascript jquery html escaping