function delete_exchange($ExchangeRateId) {
$this -> db -> where('ExchangeRateId', $ExchangeRateId);
$this -> db -> delete('exchange_rate');
}
這是控制器
function delete($ExchangeRateId) {
$user_type = $this -> session -> userdata('user_type');
if ($user_type != "admin") {
redirect(base_url() . 'user_admin/login');
}
$this -> all -> delete_exchange($ExchangeRateId);
redirect(base_url() . 'exchange/index');
}
刪除按鈕清晰,聽到我想要一個通知,如彈出是或必須運行的動作,我的意思是刪除
thansk in提前...
循着行動調用視圖彈出,然後做Ajax調用。 –
你可以使用jquery對話框,http://jqueryui.com/dialog/,它提供ok/cancel功能 – bitkot