【发布时间】:2016-05-22 15:58:13
【问题描述】:
我想在我的页面中使用 DataTable 显示表格:
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Username</th>
<th>Firstname</th>
<th>Lastname</th>
<th>Phone</th>
<th>Password</th>
<th></th>
</tr>
</thead>
<tfoot>
<tr>
<th>Username</th>
<th>Firstname</th>
<th>Lastname</th>
<th>Phone</th>
<th>Password</th>
<th></th>
<th></th>
</tr>
</tfoot>
<tbody>
<c:forEach items="${users}" var="user" varStatus="status">
<tr>
<form>
<td class="text-center">${user.getUsername()}</td>
<td class="text-center">${user.getFirstname()}</td>
<td class="text-center">${user.getLastname()}</td>
<td class="text-center">${user.getPhone()}</td>
<td class="text-center">${user.getPassword()}</td>
</form>
<td class="text-center"><button class="btn btn-user" onclick="show('block','${user.getUsername()}')">Delete</button></td>
<td class="text-center"><button class="btn btn-user" onclick="show2('block','${user.getFirstname()}','${user.getLastname()}','${user.getUsername()}', '${user.getPhone()}','${user.getPassword()}')">Edit</button></td>
</tr>
</c:forEach>
</tbody>
</table>
但我收到错误:未捕获的类型错误:无法读取未定义的属性“mData”
我该如何解决这个问题?
【问题讨论】:
-
我解决了我的问题:在 中缺少
标签: javascript html twitter-bootstrap jsp datatables