我不知道如何在CodeIgniter的锚码内嵌入bootstrap确认删除代码。
foreach($books as $row)
{
//Add each result row into table
$this->table->add_row(
$row['fname'],
$row['email'],
$row['pass'],
$row['image'],
anchor('welcome/remove_rcrd/'.$row['id'], 'delete'),
anchor('welcome/edit/'.$row['id'], 'Edit'));
}
当我点击删除锚点或链接
时,我想添加引导程序确认框答案 0 :(得分:0)
我认为这可能会对你有所帮助
<?php $onclick = array('onclick'=>"return confirm('Are you sure?')");?>
<?=anchor("welcome/delete/$row->id","Delete", $onclick);?>