Tad Tools 使用說明
use XoopsModules\Tadtools\SweetAlert;
使用方式:
$SweetAlert = new SweetAlert($show_jquery = true); $SweetAlert->render($func_name = '', $url = '', $var = '', $title = _TAD_DEL_CONFIRM_TITLE, $text = _TAD_DEL_CONFIRM_TEXT, $confirmButtonText = _TAD_DEL_CONFIRM_BTN, $type = 'warning', $showCancelButton = 'true', $html = '');如:
$SweetAlert = new SweetAlert(); $SweetAlert->render("del_func", "index.php?op=del&id=",'id');HTML部份,如:
<a href="javascript:del_func('<{$id}>')" class="btn btn-danger">刪除</a>