JavaScript 弹出确认提示框
$("#clean").on("click",function(){ if(window.confirm('删除数据不可恢复,您确认要删除吗?')){ //alert("确定"); $.ajax({ type:"GET", dataType:"JSON", url:"{php echo webUrl('order/list.clear')}", success:function(result){ if (result==1) { alert("清除成功!"); location.href="{php echo webUrl('order/list')}"; } }, error:function(result){ alert("清除失败!"); } }); return true; }else{ //alert("取消"); return false; } });
效果: