模板~给table某类行设置背景颜色
作者:
Mlotjve | 来源:发表于
2019-06-05 17:44 被阅读0次{% if trains %}
<table class="table table-bordered" id="table01">
<thead>
<tr>
<th>序号</th>
<th align="center">主题</th>
<th align="center">讲师</th>
<th align="center">已完成</th>
<th align="center">计划日期</th>
<th align="center">培训日期</th>
<th align="center">备注</th>
</tr>
</thead>
<tbody>
{% for i in trains %}
<tr {% ifequal i.is_over True %} tr bgcolor="#f5f5dc" {% endifequal %}>
<td>{{ i.id }}</td>
<td align=" left">{{ i.theme }}</td>
<td>{{ i.teacher }}</td>
<td>{{ i.is_over }}</td>
<td>{{ i.plan_time }}</td>
<td>{{ i.action_time }}</td>
<td>{{ i.remark }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}

image.png
本文标题:模板~给table某类行设置背景颜色
本文链接:https://www.haomeiwen.com/subject/pzpsxctx.html
网友评论