我有一个表,其中的字段包含图像和链接,但是它给出了代码而不是呈现它。
<table id="table"
data-toggle="table"
data-search="true"
data-filter-control="true"
data-show-export="true"
data-show-refresh="true"
data-show-toggle="true"
data-pagination="true"
data-toolbar="#toolbar"
class="table-responsive">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th data-field="prenom" data-filter-control="input" data-sortable="true">Title</th>
<th data-field="date" data-filter-control="select" data-sortable="true">Price</th>
<th data-field="examen" data-filter-control="select" data-sortable="true">Image</th>
<th data-field="note" data-sortable="true">Link</th>
</tr>
</thead>
<tbody>
<tr>
<td class="bs-checkbox "><input data-index="0" name="btSelectItem" type="checkbox"></td>
<td>Maths Tution</td>
<td>$20</td>
<td><img src="https://i.imgur.com/0GoaYKd.jpg" height="100" width="100"></td>
<td><a href="https://monsoonmalabar.com/sonyshop/other/product-13/">Go</a></td>
</tr>
<tr>
<td class="bs-checkbox "><input data-index="1" name="btSelectItem" type="checkbox"></td>
<td>Milk</td>
<td>$5</td>
<td><img src="https://i.imgur.com/2ZOroMI.jpg" height="100" width="100"></td>
<td><a href="https://monsoonmalabar.com/sonyshop/test_category_2/product-6/">Go</a></td>
</tr>
</tbody>
</table>
</div>
这是网站的链接,https://www.monsoonmalabar.com/aggregate_search
如何在这里呈现html?
2条答案
按热度按时间luaexgnf1#
引导表转义HTML标记。在
table
标记中添加data-escape="false"
。https://bootstrap-table.com/docs/api/table-options/#escape
abithluo2#