var returnVal = window.confirm("添加数据成功\n是否继续添加?", "标题"); if(!returnVal) { window.location.href = "Index.php"; }