Invalid location of tag(th)

Posted 笑面浮屠

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Invalid location of tag(th)相关的知识,希望对你有一定的参考价值。

编译环境: 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>.

 

以上是关于Invalid location of tag(th)的主要内容,如果未能解决你的问题,请参考以下文章