JS中confirm弹出框
1 if(confirm("确定要删除该任务吗?")){ 2 $.post("findTaskById.action",{taskId:taskId},function(data){ 3 if(data.status=='I' || data.status=='V'){ 4 window.location.href = "deleteTask.action?id=" + taskId; 5 } else { 6 alert("抱歉,该任务在当前状态下不可删除!"); 7 } 8 }); 9 }