在Servlet中添加一下代码即可
out.print("<script>alert('添加成功!');window.location='index.jsp';</script>");
本文介绍了一种在Servlet中实现添加操作后显示成功提示的方法,并立即跳转到首页的具体代码实现。
在Servlet中添加一下代码即可
out.print("<script>alert('添加成功!');window.location='index.jsp';</script>");
1868

被折叠的 条评论
为什么被折叠?