【发布时间】:2016-07-25 14:41:23
【问题描述】:
在我的 html 页面中,我有一个表格,显示来自我的数据库的数据。我想在更新我的数据库而不刷新所有页面时刷新数据表。我正在使用 PHP 框架 Laravel。
<table id="example" class="table">
<thead>
<tr class="headings">
<th>ID </th>
<th>first name </th>
<th>last name </th>
<th>E-mail </th>
<th>birthday </th>
</tr>
</thead>
<tbody>
@foreach ($users as $user)
<tr class="even pointer">
<td class=" ">{{ $user->id }}</td>
<td class=" ">{{ $user->name }}</td>
<td class=" ">{{ $user->name2 }}</td>
<td class=" ">{{ $user->email }}</td>
<td class=" ">{{ $user->birthday }}</td>
</tr>
@endforeach
</tbody>
</table>
【问题讨论】:
-
使用任何 javascript 框架,例如 jQeury/Vuejs 将查询发送到数据库并显示。
-
怎么能这样,你能举个例子吗
标签: javascript php html laravel