gpt4 book ai didi

java - 从 html 中转义特殊字符

转载 作者:行者123 更新时间:2023-12-01 07:43:18 24 4
gpt4 key购买 nike

我正在创建一个 html 表格。

<table class=" table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Remarks</th>
</tr></thead>
<tr>
<td> hello <hi> html </td>
</table>

当我运行上面的代码时,我得到如下结果“你好,html”。我需要显示全文,如 " hello <hi> html "

最佳答案

使用html entities :

<td>hello &lt;hi&gt; html</td>

关于java - 从 html 中转义特殊字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61042575/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com