[英]Record show on select on drop down box in simple html table
i want to show the records based on drop-down box if i select 25 than 25 records should be show in table if i salect 50 than 50 record should be show in table and so on. 如果我选择25比25的记录应该在表中显示,如果我选择50比50的记录在表中显示,我想根据下拉框显示记录。
here is my drop down html code. 这是我的下拉HTML代码。
</select>
<div class="pull-right">Show
<select class="drop_box">
<option label="Select View List">10</option>
<option label="25">25</option>
<option label="50">50</option>
<option label="100">100</option>
<option label="10">All</option>
</select>
records per page</div>
Here is my table html code.Here i show only few records. 这是我的表格html代码。在这里我只显示很少的记录。
<div style="display: none;" id="div1" class="drop-down-show-hide">
<table id="myTable" class="table table-striped">
<thead>
<tr>
<th>Service Name</th>
<th>Type</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>ADA/FEHA Compliance</td>
<td>Best Practice</td>
<td> <img src="img/note.png" alt="note"/></td>
<td> <img src="img/del.png" alt="edit" /></td>
</tr>
<tr>
<td>Asbestos Training (AHERA ...</td>
<td>Mandatory</td>
<td> <img src="img/note.png" alt="note"/></td>
<td> <img src="img/del.png" alt="edit" /></td>
</tr>
</tbody>
</table>
</div>
here is my java scripts code 这是我的Java脚本代码
<script>
$(document).ready(function(){
$('#myTable').dataTable();
});
</script>
Thanks!!! 谢谢!!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.