html - 我的表格内容开始很好,然后在一行中全部搞砸了(Node.js,MongoDB)
问题描述
这就是我所说的:
为什么会这样?是造型问题吗?我尝试为 tr 和 tds 添加一些宽度,它看起来一样。
这是HTML:
<div style="overflow-x:auto">
<table>
<thead>
<tr>
<th>ID</th>
<th>Nombre</th>
<th>Apellido</th>
<th>Mail</th>
<th>Confirmado</th>
</tr>
</thead>
<% personas.forEach(function(personas){ %>
<tbody>
<tr>
<td><%=personas.id%></td>
<td><%=personas.nombre%></td>
<td><%=personas.apellido%></td>
<td><%=personas.email%></td>
<td><%=personas.confirmado%></td>
</tr>
</tbody>
</table>
</div>
解决方案
foreach 的结尾必须在</tbody>
和之间</table>
推荐阅读
- firebase - 使用内部数据的 Firebase 身份验证规则
- reactjs - React Native - ReactNavigation.addNavigationHelpers 不是一个函数
- javascript - 从JS中的字符串中删除所有特殊字符
- java - Servlet 实例是线程还是进程?
- scala - 在Scala中访问嵌套If else块之外的ArrayList
- matlab - 并行化 MATLAB 代码
- node.js - Node.js 路由在 Microsoft Azure 上不起作用
- laravel-5.4 - 在 Laravel 5.4 中使用 Auth 使用 or 条件登录
- highcharts - 如何在单行中显示标签上的文本
- java - HashMap Java 中布尔值的组合