法一: if ($window.confirm("是否确认删除")){ ...... } 法二: confirm("是否确认删除? ", function(confirmed) { if(confirmed){ ...... } });