Home>Article>Backend Development> [php] Use confirm method in ajax to confirm deletion
The main content of this article is about using the confirm method in ajax to achieve confirmed deletion. It has certain reference value and interested friends can learn about it.
$("button[name=del]").click( statu = confirm("确定删除吗?"(! operation = {..:'POST',:"{:url('Sections/del')}",:{idd:operation},:(msg == 1'删除成功'.'删除失败,请稍后重试',:'删除失败,请稍后重试'
public function del() { $id=input('post.idd'); $res = $this->section->del($id); echo json_encode($res); }
del( = Section::destroy(['id' =>
If you want to know more PHP examples, please pay attention to thePHP video tutorialon the PHP Chinese website!
The above is the detailed content of [php] Use confirm method in ajax to confirm deletion. For more information, please follow other related articles on the PHP Chinese website!