后端回复前端先弹出提示框用户点击确认后跳转另一个页面
response.setHeader("Content-type", "text/html;charset=UTF-8");
response.setCharacterEncoding("UTF-8");
PrintWriter out=response.getWriter();
out.print("<script>alert('弹窗提示的信息!');window.location='你想跳的URL';</script>");
可以看到回复的是一段 js代码,也就是不止弹窗, 跳转, js能做到什么就能回复什么