【发布时间】:2022-08-10 16:44:51
【问题描述】:
我正在尝试使用引导表删除行。
桌子:
<table id=\"checkDataTable\">
<thead style=\"color: #31708f; background-color: #d9edf7 \">
<tr>
<th data-field=\"AssetReference\">Referans</th>
<th data-field=\"Customer\">Müşteri</th>
<th data-field=\"ReceiverCompanyName\">Alıcı Firma</th>
<th data-field=\"Tools\" data-formatter=\"StatuFormatter\" >İşlem</th>
</tr>
</thead>
</table>
状态格式化程序:
function StatuFormatter(value, row, index)
{
return \"<a onclick=\'removeAssetEconomyCheckBillOfLadingRow(\"+index+\")\'><i class=\'fa fa-trash fa-2x\' aria-hidden=\'true\'></i></a>\";
}
removeAssetEconomyCheckBillOfLadingRow 函数:
function removeAssetEconomyCheckBillOfLadingRow(index)
{
alert(index);
$(\'#checkDataTable\').bootstrapTable(\'remove\', {field: \'$index\',values: index});
}
我可以在alert 框中获取索引值。但是无法删除行。
标签: javascript jquery bootstrap-table