【发布时间】:2017-11-22 11:03:19
【问题描述】:
我有一个表格,通过字典列表显示信息。
这是程序:
<div class = "col-md-8" >
<table class="table table-bordered table-striped table-hover">
<thead> <!-- En-tête du tableau -->
<tr>
<th> Host Name </th>
<th> Hardware </th>
<th> Fixed-Address </th>
<th> Comment </th>
<tr>
</thead>
<tbody> <!-- Corps du tableau -->
{% for item in items %}
<tr id="confirm">
{% for key in [ 'host','hardware','fixed_address','comment' ] %}
<td> {{ item[key].decode('utf-8') }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
我想做的是能够修改它或添加一个新条目,这不是我要在这里问的,因为在此之前我需要执行以下操作:
基本上,我需要让每一行都充当一个链接,当我点击它(行)时,我应该被重定向到带有网络表单的网页,这些网络表单将填充来自表格单元格的数据.
我该怎么做?先谢谢了。
【问题讨论】: