jquery - 不更改 tabledit 中的列
问题描述
**现在有两列是可编辑的,但我只想编辑一列,即数量列。但它不起作用。下面的代码有什么问题?带有 html 代码 ** $(document).ready(function(){
$('#editable_table').Tabledit({
url:'action.php',
columns:{
identifier:[0, "id"],
editable:[ [1, 'tran_quantity'] ]
},
restoreButton:false,
onSuccess:function(data, textStatus, jqXHR)
{
if(data.action == 'delete')
$('#'+data.id).remove();
}
});
});
<table id="editable_table" class="table table-hover table-sm" style="border-radius: 5px; font-size: 12px">
<thead>
<tr>
<th>Decription</th>
<th style="text-align: right">Price</th>
<th style="text-align: center">Quantity</th>
<th style="text-align: right">Amount</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysqli_fetch_array($result))
{
echo '
<tr>
<td>'.$row["tran_description"].'</td>
<td align="right">'.$row["tran_price"].'</td>
<td align="center">'.$row["tran_quantity"].'</td>
<td align="right">'.$row["tran_amount"].'</td>
</tr>
';
}
?>
</tbody>
</table>
解决方案
推荐阅读
- android - VertScrollBox 当底部到达 android 和 IOS 时检测
- c++ - 本征和巨大的密集二维阵列
- rust - “借来的数据不能存储在其关闭之外”是什么意思?
- javascript - 如何在 Angular 6 中添加脚本文件?
- python - Keras 在一类 Cifar-10 上过拟合
- java - 如何使用延迟初始化?[延迟初始化异常]
- google-maps - 将动画标记与谷歌地图上的信息窗口混合?
- ios - UICollectionView 不加载图像
- c# - 连续 http 调用后,我的应用程序运行速度变慢
- router - 将 Livebox 连接到 Alpha 版并共享互联网