我有从我的数据库生成表格的代码。代码是
<body>
<?php include('navbar.php'); ?>
<div class="container">
<h1 class="page-header text-center">ORDER</h1>
<form method="POST" action="purchase.php">
<table class="table table-striped table-bordered">
<thead>
<th class="text-center"><input type="checkbox" id="checkAll"></th>
<th>Category</th>
<th>Product Name</th>
<th>Price</th>
<th>Quantity</th>
<th>Note</th>
</thead>
<tbody>
<?php
$sql="select * from product left join category on category.categoryid=product.categoryid order by product.categoryid asc, productname asc";
$query=$conn->query($sql);
$iterate=0;
while($row=$query->fetch_array()){
?>
<tr>
<td class="text-center"><input type="checkbox" value="<?php echo $row['productid']; ?>||<?php echo $iterate; ?>" name="productid[]" style=""></td>
<td><?php echo $row['catname']; ?></td>
<td><?php echo $row['productname']; ?></td>
<td class="text-right">₨ <?php echo number_format($row['price'], 2); ?></td>
<td><input type="text" class="form-control" name="quantity_<?php echo $iterate; ?>"></td>
<td><input type="text" class="form-control" name="note_<?php echo $iterate; ?>"></td>
</tr>
<?php
$iterate++;
}
?>
</tbody>
现在该代码将给我一张大桌子。有什么方法可以制作一些链接或按钮让我跳到表格中的特定行吗?因为滚动大表确实效率不高
慕桂英4014372
德玛西亚99
慕的地8271018