前端小白 学习的过程中 遇到一个问题 为什么里面嵌套的表格中的usr的元素 都只是usrs中的第一个 求大佬解释
<table class="table table-bordered">
{% for usr in surs %}
<tr>
<td>{{ usr.id }}</td>
<td>{{ usr.name }}</td>
<td>{{ usr.birth }}</td>
<td>
<button class="pear-btn pear-btn-primary pear-btn-xs" data-toggle="modal" data-target="#myModal">详情</button>
<div class="modal fade" id="myModal" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">详细信息</h4>
</div>
<div class="modal-body" >
<table class="table table-bordered" style="margin-top:40px">
<tr>
<td>ID</td>
<td>{{ usr.id }}</td>
</tr>
<tr>
<td>name</td>
<td>{{ usr.name }}</td>
</tr>
<tr>
<td>birth</td>
<td>{{ usr.birth }}</td>
</tr>
<tr>
<td>nickname</td>
<td>{{ usr.nuckname }}</td>
</tr>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
</td>
</tr>
{% endfor %}