【发布时间】:2015-12-07 03:49:28
【问题描述】:
如何过滤选择选项中的数据并将其作为报告显示在另一个表格中。我不知道如何使用 JavaScript。
下面是我的report.blade.php
<table width="100%">
<div id="DrpDwn" align="center">
<h1> report</h1> <br/>
Programme:<select id="program">
@foreach($profiles as $profile)
<option>{{$profile->program}}</option>
@endforeach
</select><br>
Faculty:<select id="faculty">
@foreach($profiles as $profile)
<option> {{$profile->faculty}}</option>
@endforeach
</select>
</div>
<br />
<table id="tableID" border="2" width="100%">
<tr>
<td class="student_id" width="15%">Student id </td>
<td class="name" width="30%">name</td>
<td class="program" width="30%"> Program</td>
<td class="faculty" width="25%">Faculty </td>
</tr>
@foreach($profiles as $profile)
<tr>
<td class="student_id" width="15%">{{$profile->student_id }}</td>
<td class="name" width="30%">{{$profile->student_name }}</td>
<td class="program" width="30%"> {{$profile->program }}</td>
<td class="faculty" width="25%">{{$profile->faculty }} </td>
</tr>
@endforeach
</table>
</table>
我想要这样.. 当我单击程序:文凭多媒体时,它将仅显示与之相关的数据。 (对不起我的英语不好)
【问题讨论】:
-
您是在寻求 JS 帮助还是非 js 解决方案?
-
哪一个容易理解?
标签: javascript php jquery laravel-5.1