编译环境: Windows7+Ecliplse+Django
1 <table border="1"> 2 <thead> 3 <tr> 4 <th>用户名</th> 5 <th>密码</th> 6 </tr> 7 </thead> 8 <tbody> 9 10 {% for line in data %} 11 <tr> 12 <td> {{ line.user}} </td> 13 <td> {{ line.pwd }}</td> 14 </tr> 15 {% endfor %} 16 17 </tbody> 18 </table>
解决方法就是在<th>外面加<tr>.
时间: 2024-10-17 17:56:19