使用jquery的确认框

ent*_*tic 2 jquery

我想在删除一些数据之前做出确认,那么我怎样才能使用jquery呢?

Bar*_*der 19

$('#deleteBtn').click(function() {
  if(confirm("Are you sure?")) {
    //delete here
  }
});
Run Code Online (Sandbox Code Playgroud)